Unable to connect to postgres database for monitoring
Unable to connect to postgres database for monitoring
Hi Team,
While monitoring Postgres database from Nagios XI server We are not able to connect to the database, refer the attached snapshot message: The port is open but when we are trying from the command prompt it shows that port is closed , it shows the same output for 5666 but we are monitoring the filesystem well. This is affecting the production harshly.
Kindly suggest on it priority.
While monitoring Postgres database from Nagios XI server We are not able to connect to the database, refer the attached snapshot message: The port is open but when we are trying from the command prompt it shows that port is closed , it shows the same output for 5666 but we are monitoring the filesystem well. This is affecting the production harshly.
Kindly suggest on it priority.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Unable to connect to postgres database for monitoring
Can you please post the service definition for us to look at, and also a copy of the plugin?
Your screenshot indicates check_http & check_nrpe, but this appears to be a postgres plugin you're using.
Your screenshot indicates check_http & check_nrpe, but this appears to be a postgres plugin you're using.
Former Nagios Employee
Re: Unable to connect to postgres database for monitoring
Hi Team,
Please refer the attached snapshot we are firing the mentioned command in snapshot.
We are using check_postgres.pl script.
Let us know from where we can get the service definition? which you have requested.
Please refer the attached snapshot we are firing the mentioned command in snapshot.
We are using check_postgres.pl script.
Let us know from where we can get the service definition? which you have requested.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Unable to connect to postgres database for monitoring
Is 10.144.223.155 the IP address of your Nagios XI server? Is it added to the "pg_hba.conf" on the remote machine (10.148.54.187)?
Run the following commands on the 10.148.54.187 server and show the output:
Note: Modify the paths to the config files if needed.
Can you log in posgres manually (as "nagios" user) on the remote box and access the "g_db_recohemea" db?
Run the following commands on the 10.148.54.187 server and show the output:
Code: Select all
grep 10.144.223.155 /var/lib/pgsql/data/pg_hba.conf
grep "listen_addresses =" /var/lib/pgsql/data/postgresql.confCan you log in posgres manually (as "nagios" user) on the remote box and access the "g_db_recohemea" db?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Unable to connect to postgres database for monitoring
Hi Team,
yes 10.144.223.155 is the Nagios server IP.
Nagios server IP is added to pg_hba.conf on the remote host(10.148.54.187), kindly refer the output of the command below:
-bash-3.2$ grep 10.144.223.155 /psqldata/PostgresPlus/9.2AS/data/pg_hba.conf
host all all 10.144.223.155/32 md5
-bash-3.2$ grep "listen_addresses =" /psqldata/PostgresPlus/9.2AS/data/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on;
We are able to login to the postgres database manually on the remote host and access the database.
Kindly suggest.
yes 10.144.223.155 is the Nagios server IP.
Nagios server IP is added to pg_hba.conf on the remote host(10.148.54.187), kindly refer the output of the command below:
-bash-3.2$ grep 10.144.223.155 /psqldata/PostgresPlus/9.2AS/data/pg_hba.conf
host all all 10.144.223.155/32 md5
-bash-3.2$ grep "listen_addresses =" /psqldata/PostgresPlus/9.2AS/data/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on;
We are able to login to the postgres database manually on the remote host and access the database.
Kindly suggest.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Unable to connect to postgres database for monitoring
Code: Select all
host all all 10.144.223.155/32 md5Code: Select all
echo -n 'password' | md5sumCode: Select all
host all all 10.144.223.155/32 passwordRe: Unable to connect to postgres database for monitoring
Hi Team,
We have md5 encryption in all postgres databases and its working fine.
Kindly suggest.
We have md5 encryption in all postgres databases and its working fine.
Kindly suggest.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Unable to connect to postgres database for monitoring
Did you md5 the password and use the md5'd password in your check command?
Code: Select all
echo -n 'password' | md5sumRe: Unable to connect to postgres database for monitoring
Hi Team,
There is no issue with the password as we are able to check the backend connections and it is giving us required output. We are facing issue only for connection status.
Kindly provide us any feasible solution.
There is no issue with the password as we are able to check the backend connections and it is giving us required output. We are facing issue only for connection status.
Kindly provide us any feasible solution.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Unable to connect to postgres database for monitoring
Do you see any errors in the log files on the Postgress server when the check is run?
Can you upgrade to the latest version of the check_postgres.pl and see if it still fails for you?
You can get the latest plugin here.
https://bucardo.org/wiki/Check_postgres
Can you upgrade to the latest version of the check_postgres.pl and see if it still fails for you?
You can get the latest plugin here.
https://bucardo.org/wiki/Check_postgres
Be sure to check out our Knowledgebase for helpful articles and solutions!