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" "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: '{{ and (eq .Port "8091") (glob .Cmdline "*couchbase*") }}' - tags: "couchdb" expr: '{{ and (eq .Port "5984") (glob .Cmdline "*couchdb*") }}' - tags: "dnsdist" expr: '{{ and (eq .Port "8083") (eq .Comm "dnsdist") }}' - tags: "dnsmasq" expr: '{{ and (eq .Port "53") (eq .Comm "dnsmasq") }}' - tags: "docker_engine" expr: '{{ and (eq .Port "9323") (eq .Comm "dockerd") }}' - tags: "elasticsearch" expr: '{{ and (eq .Port "9200") (glob .Cmdline "*elasticsearch*") }}' - tags: "opensearch" expr: '{{ and (eq .Port "9200") (glob .Cmdline "*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: '{{ and (eq .Port "27017") (eq .Comm "mongod") }}' - tags: "mysql" expr: '{{ and (eq .Port "3306") (eq .Comm "mysqld" "mariadb") }}' - tags: "nginx" expr: '{{ and (eq .Port "80" "8080") (eq .Comm "nginx" "nginx:") }}' - tags: "ntpd" expr: '{{ and (eq .Port "123") (eq .Comm "ntpd") }}' - tags: "openvpn" expr: '{{ and (eq .Port "7505") (eq .Comm "openvpn") }}' - tags: "pgbouncer" expr: '{{ and (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: '{{ and (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: '{{ and (eq .Port "6032") (eq .Comm "proxysql") }}' - tags: "rabbitmq" expr: '{{ and (eq .Port "15672") (glob .Cmdline "*rabbitmq*") }}' - tags: "redis" expr: '{{ and (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: '{{ and (eq .Port "3493") (eq .Comm "upsd") }}' - tags: "vernemq" expr: '{{ and (eq .Port "8888") (glob .Cmdline "*vernemq*") }}' - tags: "zookeeper" expr: '{{ and (eq .Port "2181" "2182") (glob .Cmdline "*zookeeper*") }}' - tags: "zookeeper" expr: '{{ and (eq .Port "2181" "2182") (glob .Cmdline "*zookeeper*") }}' - name: "Prometheus exporters" selector: "unknown" tags: "-unknown exporter" match: - tags: "exporter" expr: '{{ not (empty (promPort .Port)) }}' compose: - name: "Applications" selector: "app" config: - selector: "activemq" template: | module: activemq name: local url: http://localhost:{{.Port}} webadmin: admin - selector: "apache" template: | module: apache name: local url: http://localhost:{{.Port}}/server-status?auto - selector: "bind" template: | module: bind name: local url: http://localhost:{{.Port}}/json/v1 - selector: "cassandra" template: | module: cassandra name: local url: http://localhost:{{.Port}}/metrics - selector: "chrony" template: | module: chrony name: local address: 127.0.0.1:{{.Port}} - selector: "cockroachdb" template: | module: cockroachdb name: local url: http://localhost:{{.Port}}/_status/vars - selector: "consul" template: | module: consul name: local url: http://localhost:{{.Port}} - selector: "coredns" template: | module: coredns name: local url: http://localhost:{{.Port}}/metrics - selector: "couchbase" template: | module: couchbase name: local url: http://localhost:{{.Port}} - selector: "couchdb" template: | module: couchdb name: local url: http://localhost:{{.Port}} node: '_local' - selector: "dnsdist" template: | module: dnsdist name: local url: http://localhost:{{.Port}} headers: X-API-Key: 'dnsdist-api-key' - selector: "dnsmasq" template: | module: dnsmasq name: local protocol: udp address: 127.0.0.1:{{.Port}} - selector: "docker_engine" template: | module: docker_engine name: local url: http://localhost:{{.Port}}/metrics - selector: "elasticsearch" template: | module: elasticsearch name: local url: http://localhost:{{.Port}} cluster_mode: no - selector: "opensearch" template: | module: elasticsearch name: local url: https://localhost:{{.Port}} cluster_mode: no tls_skip_verify: yes username: admin password: admin - selector: "envoy" template: | module: envoy name: local url: http://localhost:{{.Port}}/stats/prometheus - selector: "envoy" template: | module: envoy name: local url: http://localhost:{{.Port}}/stats/prometheus - selector: "fluentd" template: | module: fluentd name: local url: http://localhost:{{.Port}} - selector: "freeradius" template: | module: freeradius name: local address: localhost port: {{.Port}} secret: adminsecret - selector: "geth" template: | module: geth name: local url: http://localhost:{{.Port}}/debug/metrics/prometheus - selector: "haproxy" template: | module: haproxy name: local url: http://localhost:{{.Port}}/metrics - selector: "hdfs_namenode" template: | module: hdfs name: namenode_local url: http://localhost:{{.Port}}/jmx - selector: "hdfs_datanode" template: | module: hdfs name: datanode_local url: http://localhost:{{.Port}}/jmx - selector: "kubelet" template: | module: kubelet name: local {{- if eq .Port "10255" }} url: http://localhost:{{.Port}}/metrics {{- else }} url: https://localhost:{{.Port}}/metrics tls_skip_verify: yes {{- end }} - selector: "kubeproxy" template: | module: kubeproxy name: local url: http://localhost:{{.Port}}/metrics - selector: "lighttpd" template: | module: lighttpd name: local url: http://localhost:{{.Port}}/server-status?auto - selector: "logstash" template: | module: logstash name: local url: http://localhost:{{.Port}} - selector: "mongodb" template: | module: mongodb name: local uri: mongodb://localhost:{{.Port}} - selector: "mysql" template: | module: mysql name: local dsn: netdata@tcp(127.0.0.1:{{.Port}})/ - selector: "nginx" template: | module: nginx name: local url: http://localhost:{{.Port}}/stub_status - selector: "ntpd" template: | module: ntpd name: local address: 127.0.0.1:{{.Port}} collect_peers: no - selector: "openvpn" template: | module: openvpn name: local address: 127.0.0.1:{{.Port}} - selector: "pgbouncer" template: | module: pgbouncer name: local dsn: postgres://netdata:postgres@127.0.0.1:{{.Port}}/pgbouncer - selector: "pihole" template: | module: pihole name: local url: http://localhost - selector: "pika" template: | module: pika name: local address: redis://@127.0.0.1:{{.Port}} - selector: "postgres" template: | module: postgres name: local dsn: postgresql://netdata@127.0.0.1:{{.Port}}/postgres - selector: "powerdns" template: | module: powerdns name: local url: http://localhost:{{.Port}} headers: X-API-KEY: secret - selector: "powerdns_recursor" template: | module: powerdns_recursor name: local url: http://localhost:{{.Port}} headers: X-API-KEY: secret - selector: "proxysql" template: | module: proxysql name: local dsn: stats:stats@tcp(127.0.0.1:{{.Port}})/ - selector: "rabbitmq" template: | module: rabbitmq name: local url: http://localhost:{{.Port}} username: guest password: guest collect_queues_metrics: no - selector: "redis" template: | module: redis name: local address: redis://@127.0.0.1:{{.Port}} - selector: "supervisord" template: | module: supervisord name: local url: http://localhost:{{.Port}}/RPC2 - selector: "traefik" template: | module: traefik name: local url: http://localhost:{{.Port}}/metrics - selector: "traefik" template: | module: traefik name: local url: http://localhost:{{.Port}}/metrics - selector: "unbound" template: | module: unbound name: local address: 127.0.0.1:{{.Port}} - selector: "upsd" template: | module: upsd name: local address: 127.0.0.1:{{.Port}} - selector: "vernemq" template: | module: vernemq name: local url: http://localhost:{{.Port}}/metrics - selector: "zookeeper" template: | module: zookeeper name: local address: 127.0.0.1:{{.Port}} - name: "Prometheus exporters generic" selector: "exporter" config: - selector: "exporter" template: | {{ $name := promPort .Port -}} module: prometheus name: {{$name}}_local url: http://localhost:{{.Port}}/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 -}}