Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Postgresql 9.3 Streaming Replication Delay
- Nagios 3.x
- Nagios 4.x
GPL
9299
File | Description |
---|---|
check_repdelay.py | Python Script |
check_repdel.php | pnp4nagios template |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
This script will check the delay in seconds of your PostgreSQL 9.3 hot standby. I am assuming that users are familiar enough with PostgreSQL and the use of .pgpass that I don't need to cover the full setup details here.
Written for CentOS 6.x using Python 2.6.6 (current version on CentOS 6 at time of writing) I suspect it will work on 2.6.9 without issue, I have not tested on 3.x
For security purposes, I suggest using a .pgpass file in your nrpe users home director (CentOS 6.x = /var/run/nrpe/). This will allow you to leave the -P/--password field blank and only provide a username which you reference in the .pgpass file.
To test if the script runs as the nrpe user, the follow command run as root will execute it as the nrpe user.
sudo su nrpe -c '/usr/lib64/nagios/plugins/check_repdelay.py' -s /bin/bash
You can add -C and -W levels inside the single quotes for testing functionality.
The .php template for pnp4nagios is provided.
Written for CentOS 6.x using Python 2.6.6 (current version on CentOS 6 at time of writing) I suspect it will work on 2.6.9 without issue, I have not tested on 3.x
For security purposes, I suggest using a .pgpass file in your nrpe users home director (CentOS 6.x = /var/run/nrpe/). This will allow you to leave the -P/--password field blank and only provide a username which you reference in the .pgpass file.
To test if the script runs as the nrpe user, the follow command run as root will execute it as the nrpe user.
sudo su nrpe -c '/usr/lib64/nagios/plugins/check_repdelay.py' -s /bin/bash
You can add -C and -W levels inside the single quotes for testing functionality.
The .php template for pnp4nagios is provided.
Reviews (0)
Be the first to review this listing!