diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2024-03-20 12:45:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 12:45:08 +0200 |
commit | eb1b5478c200a402ebb6b395ab523045ac087187 (patch) | |
tree | 9ad241a38995560ab7dc893ef5484eb0dbe094d2 | |
parent | d5c100a92b268bf8f40e5dc4902f3d0aa546b531 (diff) |
go.d: local-listeners sd: trust known ports to identify an app (#17205)
-rw-r--r-- | src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf b/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf index 10e622bd48..2d5210e84e 100644 --- a/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf +++ b/src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf @@ -29,9 +29,9 @@ 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" @@ -39,9 +39,7 @@ classify: - 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" @@ -65,33 +63,33 @@ 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" @@ -99,13 +97,11 @@ classify: - 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" @@ -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 |