blob: 68d2d76d7aafbc16593bef86ea4544a663112c1d (
plain)
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
|
disabled: no
name: 'network listeners'
discover:
- discoverer: net_listeners
net_listeners:
tags: "unknown"
classify:
- name: "Applications"
selector: "unknown"
tags: "-unknown app"
match:
- tags: "activemq"
expr: '{{ and (eq .Port "8161") (eq .Comm "activemq") }}'
- tags: "apache"
expr: '{{ and (eq .Port "80" "8080") (eq .Comm "apache" "apache2" "httpd") }}'
- tags: "bind"
expr: '{{ and (eq .Port "8653") (eq .Comm "bind" "named") }}'
- tags: "cassandra"
expr: '{{ and (eq .Port "7072") (glob .Cmdline "*cassandra*") }}'
- tags: "chrony"
expr: '{{ and (eq .Port "323") (eq .Comm "chronyd") }}'
- tags: "cockroachdb"
expr: '{{ and (eq .Port "8080") (eq .Comm "cockroach") }}'
- tags: "consul"
expr: '{{ and (eq .Port "8500") (eq .Comm "consul") }}'
- tags: "coredns"
expr: '{{ and (eq .Port "9153") (eq .Comm "coredns") }}'
- tags: "couchbase"
expr: '{{ or (eq .Port "8091") (glob .Cmdline "*couchbase*") }}'
- tags: "couchdb"
expr: '{{ or (eq .Port "5984") (glob .Cmdline "*couchdb*") }}'
- tags: "dnsdist"
expr: '{{ and (eq .Port "8083") (eq .Comm "dnsdist") }}'
- tags: "dnsmasq"
expr: '{{ and (eq .Protocol "UDP") (eq .Port "53") (eq .Comm "dnsmasq") }}'
- tags: "docker_engine"
expr: '{{ and (eq .Port "9323") (eq .Comm "dockerd") }}'
- tags: "elasticsearch"
expr: '{{ or (eq .Port "9200") (glob .Cmdline "*elasticsearch*" "*opensearch*") }}'
- tags: "envoy"
expr: '{{ and (eq .Port "9901") (eq .Comm "envoy") }}'
- tags: "fluentd"
expr: '{{ and (eq .Port "24220") (glob .Cmdline "*fluentd*") }}'
- tags: "freeradius"
expr: '{{ and (eq .Port "18121") (eq .Comm "freeradius") }}'
- tags: "geth"
expr: '{{ and (eq .Port "6060") (eq .Comm "geth") }}'
- tags: "haproxy"
expr: '{{ and (eq .Port "8404") (eq .Comm "haproxy") }}'
- tags: "hdfs_namenode"
expr: '{{ and (eq .Port "9870") (eq .Comm "hadoop") }}'
- tags: "hdfs_datanode"
expr: '{{ and (eq .Port "9864") (eq .Comm "hadoop") }}'
- tags: "kubelet"
expr: '{{ and (eq .Port "10250" "10255") (eq .Comm "kubelet") }}'
- tags: "kubeproxy"
expr: '{{ and (eq .Port "10249") (eq .Comm "kube-proxy") }}'
- tags: "lighttpd"
expr: '{{ and (eq .Port "80" "8080") (eq .Comm "lighttpd") }}'
- tags: "logstash"
expr: '{{ and (eq .Port "9600") (glob .Cmdline "*logstash*") }}'
- tags: "mongodb"
expr: '{{ or (eq .Port "27017") (eq .Comm "mongod") }}'
- tags: "mysql"
expr: '{{ or (eq .Port "3306") (eq .Comm "mysqld" "mariadbd") }}'
- tags: "nginx"
expr: '{{ and (eq .Port "80" "8080") (eq .Comm "nginx" "nginx:") }}'
- tags: "ntpd"
expr: '{{ or (eq .Port "123") (eq .Comm "ntpd") }}'
- tags: "openvpn"
expr: '{{ and (eq .Port "7505") (eq .Comm "openvpn") }}'
- tags: "pgbouncer"
expr: '{{ or (eq .Port "6432") (eq .Comm "pgbouncer") }}'
- tags: "pihole"
expr: '{{ and (eq .Port "53") (eq .Comm "pihole-FTL") }}'
- tags: "pika"
expr: '{{ and (eq .Port "9221") (eq .Comm "pika") }}'
- tags: "postgres"
expr: '{{ or (eq .Port "5432") (eq .Comm "postgres") }}'
- tags: "powerdns"
expr: '{{ and (eq .Port "8081") (eq .Comm "pdns_server") }}'
- tags: "powerdns_recursor"
expr: '{{ and (eq .Port "8081") (eq .Comm "pdns_recursor") }}'
- tags: "proxysql"
expr: '{{ or (eq .Port "6032") (eq .Comm "proxysql") }}'
- tags: "rabbitmq"
expr: '{{ or (eq .Port "15672") (glob .Cmdline "*rabbitmq*") }}'
- tags: "redis"
expr: '{{ or (eq .Port "6379") (eq .Comm "redis-server") }}'
- tags: "supervisord"
expr: '{{ and (eq .Port "9001") (eq .Comm "supervisord") }}'
- tags: "traefik"
expr: '{{ and (eq .Port "80" "8080") (eq .Comm "traefik") }}'
- tags: "unbound"
expr: '{{ and (eq .Port "8953") (eq .Comm "unbound") }}'
- tags: "upsd"
expr: '{{ or (eq .Port "3493") (eq .Comm "upsd") }}'
- tags: "vernemq"
expr: '{{ and (eq .Port "8888") (glob .Cmdline "*vernemq*") }}'
- tags: "zookeeper"
expr: '{{ or (eq .Port "2181" "2182") (glob .Cmdline "*zookeeper*") }}'
- name: "Prometheus exporters"
selector: "unknown"
tags: "-unknown exporter"
match:
- tags: "exporter"
expr: '{{ and (not (empty (promPort .Port))) (not (eq .Comm "docker-proxy")) }}'
compose:
- name: "Applications"
selector: "app"
config:
- selector: "activemq"
template: |
module: activemq
name: local
url: http://{{.Address}}
webadmin: admin
- selector: "apache"
template: |
module: apache
name: local
url: http://{{.Address}}/server-status?auto
- selector: "bind"
template: |
module: bind
name: local
url: http://{{.Address}}/json/v1
- selector: "cassandra"
template: |
module: cassandra
name: local
url: http://{{.Address}}/metrics
- selector: "chrony"
template: |
module: chrony
name: local
address: {{.Address}}
- selector: "cockroachdb"
template: |
module: cockroachdb
name: local
url: http://{{.Address}}/_status/vars
- selector: "consul"
template: |
module: consul
name: local
url: http://{{.Address}}
- selector: "coredns"
template: |
module: coredns
name: local
url: http://{{.Address}}/metrics
- selector: "couchbase"
template: |
module: couchbase
name: local
url: http://{{.Address}}
- selector: "couchdb"
template: |
module: couchdb
name: local
url: http://{{.Address}}
node: '_local'
- selector: "dnsdist"
template: |
module: dnsdist
name: local
url: http://{{.Address}}
headers:
X-API-Key: 'dnsdist-api-key'
- selector: "dnsmasq"
template: |
module: dnsmasq
name: local
protocol: udp
address: {{.Address}}
- selector: "docker_engine"
template: |
module: docker_engine
name: local
url: http://{{.Address}}/metrics
- selector: "elasticsearch"
template: |
module: elasticsearch
name: local
{{ if glob .Cmdline "*elastic*" -}}
url: http://{{.Address}}
{{ else -}}
url: https://{{.Address}}
tls_skip_verify: yes
username: admin
password: admin
{{ end -}}
- selector: "envoy"
template: |
module: envoy
name: local
url: http://{{.Address}}/stats/prometheus
- selector: "envoy"
template: |
module: envoy
name: local
url: http://{{.Address}}/stats/prometheus
- selector: "fluentd"
template: |
module: fluentd
name: local
url: http://{{.Address}}
- selector: "freeradius"
template: |
module: freeradius
name: local
address: {{.IPAddress}}
port: {{.Port}}
secret: adminsecret
- selector: "geth"
template: |
module: geth
name: local
url: http://{{.Address}}/debug/metrics/prometheus
- selector: "haproxy"
template: |
module: haproxy
name: local
url: http://{{.Address}}/metrics
- selector: "hdfs_namenode"
template: |
module: hdfs
name: namenode_local
url: http://{{.Address}}/jmx
- selector: "hdfs_datanode"
template: |
module: hdfs
name: datanode_local
url: http://{{.Address}}/jmx
- selector: "kubelet"
template: |
module: k8s_kubelet
name: local
{{- if eq .Port "10255" }}
url: http://{{.Address}}/metrics
{{- else }}
url: https://{{.Address}}/metrics
tls_skip_verify: yes
{{- end }}
- selector: "kubeproxy"
template: |
module: k8s_kubeproxy
name: local
url: http://{{.Address}}/metrics
- selector: "lighttpd"
template: |
module: lighttpd
name: local
url: http://{{.Address}}/server-status?auto
- selector: "logstash"
template: |
module: logstash
name: local
url: http://{{.Address}}
- selector: "mongodb"
template: |
module: mongodb
name: local
uri: mongodb://{{.Address}}
- selector: "mysql"
template: |
- module: mysql
name: local
dsn: netdata@unix(/var/run/mysqld/mysqld.sock)/
- module: mysql
name: local
dsn: netdata@tcp({{.Address}})/
- selector: "nginx"
template: |
- module: nginx
name: local
url: http://{{.Address}}/stub_status
- module: nginx
name: local
url: http://{{.Address}}/basic_status
- module: nginx
name: local
url: http://{{.Address}}/nginx_status
- module: nginx
name: local
url: http://{{.Address}}/status
- selector: "ntpd"
template: |
module: ntpd
name: local
address: {{.Address}}
collect_peers: no
- selector: "openvpn"
template: |
module: openvpn
name: local
address: {{.Address}}
- selector: "pgbouncer"
template: |
module: pgbouncer
name: local
dsn: postgres://netdata:postgres@{{.Address}}/pgbouncer
- selector: "pihole"
template: |
module: pihole
name: local
url: http://{{.Address}}
- selector: "pika"
template: |
module: pika
name: local
address: redis://@{{.IPAddress}}:{{.Port}}
- selector: "postgres"
template: |
- module: postgres
name: local
dsn: 'host=/var/run/postgresql dbname=postgres user=postgres'
- module: postgres
name: local
dsn: 'host=/var/run/postgresql dbname=postgres user=netdata'
- module: postgres
name: local
dsn: postgresql://netdata@{{.Address}}/postgres
- selector: "powerdns"
template: |
module: powerdns
name: local
url: http://{{.Address}}
headers:
X-API-KEY: secret
- selector: "powerdns_recursor"
template: |
module: powerdns_recursor
name: local
url: http://{{.Address}}
headers:
X-API-KEY: secret
- selector: "proxysql"
template: |
module: proxysql
name: local
dsn: stats:stats@tcp({{.Address}})/
- selector: "rabbitmq"
template: |
module: rabbitmq
name: local
url: http://{{.Address}}
username: guest
password: guest
collect_queues_metrics: no
- selector: "redis"
template: |
module: redis
name: local
address: redis://@{{.Address}}
- selector: "supervisord"
template: |
module: supervisord
name: local
url: http://{{.Address}}/RPC2
- selector: "traefik"
template: |
module: traefik
name: local
url: http://{{.Address}}/metrics
- selector: "traefik"
template: |
module: traefik
name: local
url: http://{{.Address}}/metrics
- selector: "unbound"
template: |
module: unbound
name: local
address: {{.Address}}
- selector: "upsd"
template: |
module: upsd
name: local
address: {{.Address}}
- selector: "vernemq"
template: |
module: vernemq
name: local
url: http://{{.Address}}/metrics
- selector: "zookeeper"
template: |
module: zookeeper
name: local
address: {{.Address}}
- name: "Prometheus exporters generic"
selector: "exporter"
config:
- selector: "exporter"
template: |
{{ $name := promPort .Port -}}
module: prometheus
name: {{$name}}_local
url: http://{{.Address}}/metrics
{{ if eq $name "caddy" -}}
expected_prefix: 'caddy_'
{{ else if eq $name "openethereum" -}}
expected_prefix: 'blockchaincache_'
{{ else if eq $name "crowdsec" -}}
expected_prefix: 'cs_'
{{ else if eq $name "netbox" -}}
expected_prefix: 'django_'
{{ else if eq $name "traefik" -}}
expected_prefix: 'traefik_'
{{ else if eq $name "pushgateway" -}}
expected_prefix: 'pushgateway_'
selector:
allow:
- pushgateway_*
{{ else if eq $name "wireguard_exporter" -}}
expected_prefix: 'wireguard_exporter'
{{ end -}}
|