Postgres monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
maoreyes76
Posts: 11
Joined: Wed Jan 27, 2016 3:59 am

Postgres monitoring

Post by maoreyes76 »

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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Postgres monitoring

Post by benjaminsmith »

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.

Code: Select all

su - nagios
 /usr/local/nagios/libexec/check_postgres.pl -V
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
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!
maoreyes76
Posts: 11
Joined: Wed Jan 27, 2016 3:59 am

Re: Postgres monitoring

Post by maoreyes76 »

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"?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Postgres monitoring

Post by ssax »

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.
Locked