diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:53:24 +0000 |
commit | b5f8ee61a7f7e9bd291dd26b0585d03eb686c941 (patch) | |
tree | d4d31289c39fc00da064a825df13a0b98ce95b10 /src/go/collectors/go.d.plugin/config/go.d/sd/docker.conf | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-b5f8ee61a7f7e9bd291dd26b0585d03eb686c941.tar.xz netdata-b5f8ee61a7f7e9bd291dd26b0585d03eb686c941.zip |
Adding upstream version 1.46.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/go/collectors/go.d.plugin/config/go.d/sd/docker.conf | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/config/go.d/sd/docker.conf b/src/go/collectors/go.d.plugin/config/go.d/sd/docker.conf new file mode 100644 index 000000000..b0f1a3aa9 --- /dev/null +++ b/src/go/collectors/go.d.plugin/config/go.d/sd/docker.conf @@ -0,0 +1,191 @@ +disabled: no + +name: 'docker' + +discover: + - discoverer: docker + docker: + tags: "unknown" + address: "unix:///var/run/docker.sock" + +classify: + - name: "Skip" + selector: "unknown" + tags: "skip" + match: + - tags: "skip" + expr: | + {{ $netNOK := eq .NetworkMode "host" -}} + {{ $protoNOK := not (eq .PortProtocol "tcp") -}} + {{ $portNOK := empty .PrivatePort -}} + {{ $addrNOK := or (empty .IPAddress) (glob .PublicPortIP "*:*") -}} + {{ or $netNOK $protoNOK $portNOK $addrNOK }} + - name: "Applications" + selector: "!skip unknown" + tags: "-unknown app" + match: + - tags: "apache" + expr: '{{ match "sp" .Image "httpd httpd:* */apache */apache:* */apache2 */apache2:*" }}' + - tags: "cockroachdb" + expr: '{{ match "sp" .Image "cockroachdb/cockroach cockroachdb/cockroach:*" }}' + - tags: "consul" + expr: '{{ match "sp" .Image "consul consul:* */consul */consul:*" }}' + - tags: "coredns" + expr: '{{ match "sp" .Image "*/coredns */coredns:*" }}' + - tags: "couchbase" + expr: '{{ or (eq .PrivatePort "8091") (match "sp" .Image "couchbase couchbase:*") }}' + - tags: "couchdb" + expr: '{{ or (eq .PrivatePort "5984") (match "sp" .Image "couchdb couchdb:*") }}' + - tags: "elasticsearch" + expr: '{{ or (eq .PrivatePort "9200") (match "sp" .Image "elasticsearch elasticsearch:* */elasticsearch */elasticsearch:* */opensearch */opensearch:*") }}' + - tags: "lighttpd" + expr: '{{ match "sp" .Image "*/lighttpd */lighttpd:*" }}' + - tags: "mongodb" + expr: '{{ or (eq .PrivatePort "27017") (match "sp" .Image "mongo mongo:* */mongodb */mongodb:* */mongodb-community-server */mongodb-community-server:*") }}' + - tags: "mysql" + expr: '{{ or (eq .PrivatePort "3306") (match "sp" .Image "mysql mysql:* */mysql */mysql:* mariadb mariadb:* */mariadb */mariadb:* percona percona:* */percona-mysql */percona-mysql:*") }}' + - tags: "nginx" + expr: '{{ match "sp" .Image "nginx nginx:*" }}' + - tags: "pgbouncer" + expr: '{{ or (eq .PrivatePort "6432") (match "sp" .Image "*/pgbouncer */pgbouncer:*") }}' + - tags: "pika" + expr: '{{ match "sp" .Image "pikadb/pika pikadb/pika:*" }}' + - tags: "postgres" + expr: '{{ or (eq .PrivatePort "5432") (match "sp" .Image "postgres postgres:* */postgres */postgres:* */postgresql */postgresql:*") }}' + - tags: "proxysql" + expr: '{{ or (eq .PrivatePort "6032") (match "sp" .Image "*/proxysql */proxysql:*") }}' + - tags: "rabbitmq" + expr: '{{ or (eq .PrivatePort "15672") (match "sp" .Image "rabbitmq rabbitmq:* */rabbitmq */rabbitmq:*") }}' + - tags: "redis" + expr: '{{ or (eq .PrivatePort "6379") (match "sp" .Image "redis redis:* */redis */redis:*") }}' + - tags: "tengine" + expr: '{{ match "sp" .Image "*/tengine */tengine:*" }}' + - tags: "vernemq" + expr: '{{ match "sp" .Image "*/vernemq */vernemq:*" }}' + - tags: "zookeeper" + expr: '{{ or (eq .PrivatePort "2181") (match "sp" .Image "*/zookeeper */zookeeper:*") }}' +compose: + - name: "Applications" + selector: "app" + config: + - selector: "apache" + template: | + module: apache + name: docker_{{.Name}} + url: http://{{.Address}}/server-status?auto + - selector: "cockroachdb" + template: | + module: cockroachdb + name: docker_{{.Name}} + url: http://{{.Address}}/_status/vars + - selector: "consul" + template: | + module: consul + name: docker_{{.Name}} + url: http://{{.Address}} + - selector: "coredns" + template: | + module: coredns + name: docker_{{.Name}} + url: http://{{.Address}}/metrics + - selector: "coredns" + template: | + module: coredns + name: docker_{{.Name}} + url: http://{{.Address}}/metrics + - selector: "couchbase" + template: | + module: couchbase + name: docker_{{.Name}} + url: http://{{.Address}} + - selector: "couchdb" + template: | + module: couchdb + name: docker_{{.Name}} + url: http://{{.Address}} + - selector: "elasticsearch" + template: | + module: elasticsearch + name: docker_{{.Name}} + {{ if glob .Image "*elastic*" -}} + url: http://{{.Address}} + {{ else -}} + url: https://{{.Address}} + tls_skip_verify: yes + username: admin + password: admin + {{ end -}} + - selector: "lighttpd" + template: | + module: lighttpd + name: docker_{{.Name}} + url: http://{{.Address}}/server-status?auto + - selector: "mongodb" + template: | + module: mongodb + name: docker_{{.Name}} + uri: mongodb://{{.Address}} + - selector: "mysql" + template: | + module: mysql + name: docker_{{.Name}} + dsn: netdata@tcp({{.Address}})/ + - selector: "nginx" + template: | + - module: nginx + name: docker_{{.Name}} + url: http://{{.Address}}/stub_status + - module: nginx + name: docker_{{.Name}} + url: http://{{.Address}}/basic_status + - module: nginx + name: docker_{{.Name}} + url: http://{{.Address}}/nginx_status + - module: nginx + name: docker_{{.Name}} + url: http://{{.Address}}/status + - selector: "pgbouncer" + template: | + module: pgbouncer + name: docker_{{.Name}} + dsn: postgres://netdata:postgres@{{.Address}}/pgbouncer + - selector: "pika" + template: | + module: pika + name: docker_{{.Name}} + address: redis://@{{.Address}} + - selector: "postgres" + template: | + module: postgres + name: docker_{{.Name}} + dsn: postgres://netdata:postgres@{{.Address}}/postgres + - selector: "proxysql" + template: | + module: proxysql + name: docker_{{.Name}} + dsn: stats:stats@tcp({{.Address}})/ + - selector: "rabbitmq" + template: | + module: rabbitmq + name: docker_{{.Name}} + url: http://{{.Address}} + - selector: "redis" + template: | + module: redis + name: docker_{{.Name}} + address: redis://@{{.Address}} + - selector: "tengine" + template: | + module: tengine + name: docker_{{.Name}} + url: http://{{.Address}}/us + - selector: "vernemq" + template: | + module: vernemq + name: docker_{{.Name}} + url: http://{{.Address}}/metrics + - selector: "zookeeper" + template: | + module: vernemq + name: docker_{{.Name}} + address: {{.Address}} |