My first problem is that Service installation didn’t went well instead netdata figured out to start himself by using the direct binary from /opt/netdata folder. In order to fix it i had to delete the service from /lib/systemd/system/netdata.service and then copy it from /opt/netdata systemd folder to /lib/systemd/system/netdata.service . I noticed a lot of differences but the main one was ExecStart=/usr/sbin/netdata that was wrong or at least wasn’t existed on my Server.
My biggest problem now is with postgresql
First postgrsql is installed under /usr/local/pgsql , second problem is that I already have user not assigned with netdata that I’d like to use the .pgpass method to connect to server.
.....usr/libexec/netdata/plugins.d$ ./go.d.plugin -d -m postgres
[ DEBUG ] main[main] main.go:113 plugin: name=go.d, version=v0.45.0
[ DEBUG ] main[main] main.go:115 current user: name=netdata, uid=999
[ INFO ] main[main] agent.go:136 instance is started
[ INFO ] main[main] setup.go:42 loading config file
[ INFO ] main[main] setup.go:50 looking for 'go.d.conf' in [/opt/netdata/etc/netdata /opt/netdata/usr/lib/netdata/conf.d]
[ INFO ] main[main] setup.go:57 found '/opt/netdata/usr/lib/netdata/conf.d/go.d.conf
[ INFO ] main[main] setup.go:64 config successfully loaded
[ INFO ] main[main] agent.go:140 using config: enabled 'true', default_run 'true', max_procs '0'
[ INFO ] main[main] setup.go:69 loading modules
[ INFO ] main[main] setup.go:88 enabled/registered modules: 1/78
[ INFO ] main[main] setup.go:93 building discovery config
[ INFO ] main[main] setup.go:123 looking for 'postgres.conf' in [/opt/netdata/etc/netdata/go.d /opt/netdata/usr/lib/netdata/conf.d/go.d]
[ INFO ] main[main] setup.go:139 found '/opt/netdata/etc/netdata/go.d/postgres.conf
[ INFO ] main[main] setup.go:144 dummy/read/watch paths: 0/1/0
[ INFO ] discovery[manager] manager.go:92 registered discoverers: [file discovery: [file reader]]
[ INFO ] discovery[manager] manager.go:97 instance is started
[ INFO ] run[manager] run.go:32 instance is started
[ INFO ] build[manager] build.go:107 instance is started
[ INFO ] discovery[file manager] discovery.go:73 instance is started
[ INFO ] discovery[file reader] read.go:41 instance is started
[ INFO ] discovery[file reader] read.go:42 instance is stopped
[ DEBUG ] build[manager] build.go:154 received config group ('/opt/netdata/etc/netdata/go.d/postgres.conf'): 1 jobs (added: 1, removed: 0)
[ DEBUG ] build[manager] build.go:303 building postgres[local] job, config: map[__provider__:file reader __source__:/opt/netdata/etc/netdata/go.d/postgres.conf autodetection_retry:0 dsn:postgres://periodic@localhost:5432/postgres module:postgres name:local priority:70000 update_every:1]
[ ERROR ] postgres[local] postgres.go:119 error on pinging the Postgres database [postgres://periodic@localhost:5432/postgres]: failed to connect to `host=localhost user=periodic database=postgres`: server error (FATAL: no pg_hba.conf entry for host "127.0.0.1", user "periodic", database "postgres" (SQLSTATE 28000))
[ ERROR ] postgres[local] job.go:191 check failed
[ DEBUG ] run[manager] run.go:43 tick 0
[ DEBUG ] run[manager] run.go:43 tick 1
[ DEBUG ] run[manager] run.go:43 tick 2
^C[ INFO ] main[main] agent.go:104 received interrupt signal (2). Terminating...
[ INFO ] run[manager] run.go:33 instance is stopped
[ INFO ] build[manager] build.go:108 instance is stopped
[ INFO ] discovery[manager] manager.go:98 instance is stopped
[ INFO ] discovery[file manager] discovery.go:74 instance is stopped
[ INFO ] main[main] agent.go:137 instance is stopped
Ok there is also an other pkg installed onthe system which runs under /usr/bin/psql , but this is NOT my main installation. I guess that somehow netdata trying to execute the process by using the default psql client. So if this is the case, how I can configure the psql path?
Also my postgresql.conf containing the below entries
jobs:
- name: local
#dsn: 'postgres://postgres:postgres@127.0.0.1:5432/postgres'
dsn: 'postgres://periodic@localhost:5432/postgres'
#collect_databases_matching: '*'