-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetrics.example.yaml
More file actions
102 lines (90 loc) · 3.51 KB
/
Copy pathmetrics.example.yaml
File metadata and controls
102 lines (90 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# ShellFleet — metrics plugin (CE)
#
# Drop a real version of this file at /etc/shellfleet/metrics.yaml
# (or wherever METRICS_CONFIG_PATH points) and the dashboard's per-
# agent "Metrics" tab will render the panels you define here.
#
# CE is single-Prometheus. EE adds multiple instances, federated /
# per-tenant routing, and the SaaS observability vendors (Datadog,
# New Relic, Grafana Cloud).
#
# Env-var expansion: any `${VAR}` in this file is replaced from the
# server's process environment at load time, so secrets stay in
# .env (or a real secrets store) rather than living in the YAML.
prometheus:
url: https://prometheus.your-domain.example/api/v1
# Pick ONE auth scheme (or none, if Prometheus is on a private
# network). Comment out what you don't use.
# bearer_token: ${PROMETHEUS_BEARER}
# basic_auth:
# username: shellfleet
# password: ${PROMETHEUS_PASSWORD}
# tls:
# insecure_skip_verify: false
# timeout_secs: 10
# Optional: explicit map from agent_id → Prometheus instance label.
# By default the server takes the agent_id (e.g. `host-a-id`) and
# strips the trailing `-id` to get the instance label. If your
# Prometheus uses something different (e.g. `host:9100` or an FQDN),
# map it here.
#
# agent_instance_map:
# host-a-id: host-a.internal:9100
# host-b-id: host-b:9100
# Panels rendered on the per-agent Metrics tab. `{agent_id}` and
# `{instance}` (and `{hostname}` as an alias) are substituted into
# the query before it's sent upstream. The dashboard sends only the
# panel id + the agent id — there's no free-form PromQL from the
# client.
panels:
- id: cpu_percent
title: CPU %
description: User + system CPU across all cores
unit: percent
query: |
100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle",instance="{instance}"}[1m])) * 100)
- id: load_average
title: Load average (1m)
unit: raw
query: |
node_load1{instance="{instance}"}
- id: mem_used_bytes
title: Memory used
unit: bytes
query: |
node_memory_MemTotal_bytes{instance="{instance}"}
- node_memory_MemAvailable_bytes{instance="{instance}"}
- id: disk_used_pct_root
title: Disk used % (/)
unit: percent
query: |
100 * (1 - (
node_filesystem_avail_bytes{instance="{instance}",mountpoint="/"}
/ node_filesystem_size_bytes{instance="{instance}",mountpoint="/"}
))
- id: disk_io_bps
title: Disk I/O (bytes/s)
unit: bytes_per_sec
query: |
sum by (device) (rate(node_disk_read_bytes_total{instance="{instance}"}[1m]))
+ sum by (device) (rate(node_disk_written_bytes_total{instance="{instance}"}[1m]))
- id: net_rx_bps
title: Network receive (bytes/s)
unit: bytes_per_sec
query: |
sum by (device) (rate(node_network_receive_bytes_total{instance="{instance}",device!~"lo|veth.*|docker.*|br-.*"}[1m]))
# Requires `process_exporter` (see docs/METRICS.md). Drops in the
# "persistent process metrics" answer without ShellFleet storing
# any data — your Prometheus already does, with retention.
- id: proc_cpu_top10
title: Top processes by CPU (1m rate)
description: Requires process_exporter on the host
unit: cpu_seconds_per_sec
query: |
topk(10, rate(namedprocess_namegroup_cpu_seconds_total{instance="{instance}"}[1m]))
- id: proc_mem_top10
title: Top processes by RSS
description: Requires process_exporter on the host
unit: bytes
query: |
topk(10, namedprocess_namegroup_memory_bytes{instance="{instance}",memtype="resident"})