Skip to content

Commit

Permalink
go.d: local-listeners sd: trust known ports to identify an app (netda…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Mar 20, 2024
1 parent d5c100a commit eb1b547
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,17 @@ classify:
- tags: "coredns"
expr: '{{ and (eq .Port "9153") (eq .Comm "coredns") }}'
- tags: "couchbase"
expr: '{{ and (eq .Port "8091") (glob .Cmdline "*couchbase*") }}'
expr: '{{ or (eq .Port "8091") (glob .Cmdline "*couchbase*") }}'
- tags: "couchdb"
expr: '{{ and (eq .Port "5984") (glob .Cmdline "*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: '{{ and (eq .Port "9200") (glob .Cmdline "*elasticsearch*") }}'
- tags: "opensearch"
expr: '{{ and (eq .Port "9200") (glob .Cmdline "*opensearch*") }}'
expr: '{{ or (eq .Port "9200") (glob .Cmdline "*elasticsearch*" "*opensearch*") }}'
- tags: "envoy"
expr: '{{ and (eq .Port "9901") (eq .Comm "envoy") }}'
- tags: "fluentd"
Expand All @@ -65,47 +63,45 @@ classify:
- tags: "logstash"
expr: '{{ and (eq .Port "9600") (glob .Cmdline "*logstash*") }}'
- tags: "mongodb"
expr: '{{ and (eq .Port "27017") (eq .Comm "mongod") }}'
expr: '{{ or (eq .Port "27017") (eq .Comm "mongod") }}'
- tags: "mysql"
expr: '{{ and (eq .Port "3306") (eq .Comm "mysqld" "mariadb") }}'
expr: '{{ or (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") }}'
expr: '{{ or (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") }}'
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: '{{ and (eq .Port "5432") (eq .Comm "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: '{{ and (eq .Port "6032") (eq .Comm "proxysql") }}'
expr: '{{ or (eq .Port "6032") (eq .Comm "proxysql") }}'
- tags: "rabbitmq"
expr: '{{ and (eq .Port "15672") (glob .Cmdline "*rabbitmq*") }}'
expr: '{{ or (eq .Port "15672") (glob .Cmdline "*rabbitmq*") }}'
- tags: "redis"
expr: '{{ and (eq .Port "6379") (eq .Comm "redis-server") }}'
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: '{{ and (eq .Port "3493") (eq .Comm "upsd") }}'
expr: '{{ or (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*") }}'
expr: '{{ or (eq .Port "2181" "2182") (glob .Cmdline "*zookeeper*") }}'
- name: "Prometheus exporters"
selector: "unknown"
tags: "-unknown exporter"
Expand Down Expand Up @@ -190,17 +186,14 @@ compose:
template: |
module: elasticsearch
name: local
{{ if glob .Cmdline "*elastic*" -}}
url: http://{{.Address}}
cluster_mode: no
- selector: "opensearch"
template: |
module: elasticsearch
name: local
{{ else -}}
url: https://{{.Address}}
cluster_mode: no
tls_skip_verify: yes
username: admin
password: admin
{{ end -}}
- selector: "envoy"
template: |
module: envoy
Expand Down

0 comments on commit eb1b547

Please sign in to comment.