Hi...
I have set up Postgres monitoring but dont get it to work, i get this:
Postgres Backend Connections
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
Anyone know the reason to this error?
NagiosXI version 5.6.14
Postgres monitoring
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Postgres monitoring
Hi,
Looks like there's an error in the plugin syntax, try logging in to the XI server, run the following commands and post the output.
If that is successful, please run the full check command from this service directly from the command line, so we can review the arguments, and post the output.
We have directions for testing plugins from the shell on the following kb article. Thanks, Ben
Nagios XI - How To Test Check Commands From The Command-line
Looks like there's an error in the plugin syntax, try logging in to the XI server, run the following commands and post the output.
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_postgres.pl -V
We have directions for testing plugins from the shell on the following kb article. Thanks, Ben
Nagios XI - How To Test Check Commands From The Command-line
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
maoreyes76
- Posts: 11
- Joined: Wed Jan 27, 2016 3:59 am
Re: Postgres monitoring
HI...
Thank you for your reply.
If i run first command i get:
check_postgres.pl version 2.21.0
If i run the check command as Nagios user;
./check_postgres.pl -H test-postgres1-stage --port=5432 --dbuser=nagiosmon --dbname=postgres --dbpass="testpasswd" --action=connection
POSTGRES_CONNECTION CRITICAL: DB "postgres" (host:test-postgres1-stage) FATAL: no pg_hba.conf entry for host "10.230.100.21", user "nagiosmon", database "postgres", SSL off | time=0.01s
10.230.100.21 is our Nagios server...why do I get FATAL: no pg_hba.conf entry for host "10.230.100.21"?
Thank you for your reply.
If i run first command i get:
check_postgres.pl version 2.21.0
If i run the check command as Nagios user;
./check_postgres.pl -H test-postgres1-stage --port=5432 --dbuser=nagiosmon --dbname=postgres --dbpass="testpasswd" --action=connection
POSTGRES_CONNECTION CRITICAL: DB "postgres" (host:test-postgres1-stage) FATAL: no pg_hba.conf entry for host "10.230.100.21", user "nagiosmon", database "postgres", SSL off | time=0.01s
10.230.100.21 is our Nagios server...why do I get FATAL: no pg_hba.conf entry for host "10.230.100.21"?
Re: Postgres monitoring
You likely need to edit the /var/lib/pgsql/data/pg_hba.conf on the postgresql server to allow access from 10.230.100.21. Please attach yours if you have questions.