summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-04-01 12:23:22 +0300
committerGitHub <noreply@github.com>2024-04-01 12:23:22 +0300
commitaad196cddb0cddac4dd7105c25e1a174a3a2de68 (patch)
tree942d44031f85d223382b56f71413e8c7b21a089c
parent930f1bc9ccd00aef09f17507ff406419568cab5d (diff)
go.d: sd local listeners: add unix socket job (#17304)
-rw-r--r--src/go/collectors/go.d.plugin/config/go.d/postgres.conf9
-rw-r--r--src/go/collectors/go.d.plugin/config/go.d/sd/net_listeners.conf12
2 files changed, 14 insertions, 7 deletions
diff --git a/src/go/collectors/go.d.plugin/config/go.d/postgres.conf b/src/go/collectors/go.d.plugin/config/go.d/postgres.conf
index e92dded280..b684b70e83 100644
--- a/src/go/collectors/go.d.plugin/config/go.d/postgres.conf
+++ b/src/go/collectors/go.d.plugin/config/go.d/postgres.conf
@@ -1,9 +1,10 @@
## All available configuration options, their descriptions and default values:
## https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/postgres#readme
-jobs:
- - name: local
- dsn: 'host=/var/run/postgresql dbname=postgres user=netdata'
- #collect_databases_matching: '*'
+#jobs:
+# - name: local
+# dsn: 'host=/var/run/postgresql dbname=postgres user=netdata'
+# #collect_databases_matching: '*'
+#
# - name: local
# dsn: 'postgresql://netdata@127.0.0.1:5432/postgres'
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 7f3c93f768..4148fcd29d 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
@@ -313,9 +313,15 @@ compose:
address: redis://@{{.IPAddress}}:{{.Port}}
- selector: "postgres"
template: |
- module: postgres
- name: local
- dsn: postgresql://netdata@{{.Address}}/postgres
+ - 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