0
votes

I am trying to monitor psql container through zabbix. My zabbix-server is not allowed to gather data. I am getting different output for zabbix_get and zabbix_agentd command.
output of zabbix_agentd is-

[root@ip-]# zabbix_agentd -t psql.running[/usr/local/bin,/usr/local/etc] psql.running[/usr/local/bin,/usr/local/etc] [t|1]

output from zabbix_get is as-

[root@ip]# zabbix_get -s127.0.0.1 -p10050 -k psql.running[/usr/local/bin,/usr/local/etc]
psql: could not connect to server: Permission denied Is the server running on host "10.20.39.11" and accepting TCP/IP connections on port 5432?

1

1 Answers

1
votes

When you run zabbix_agentd, you run it as the root user, and your environment is different.

When you run zabbix_get, it connects to a running agent daemon. This daemon runs as the 'zabbix' user and has different environment variables.

In this case, you should test your userparameter command as the 'zabbix' user.