Home Directory Plugins Databases PostgresQL Postgresql 9.3 Streaming Replication Delay

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Postgresql 9.3 Streaming Replication Delay

Compatible With
  • Nagios 3.x
  • Nagios 4.x
Owner
License
GPL
Hits
9257
Files:
FileDescription
check_repdelay.pyPython Script
check_repdel.phppnp4nagios template
Nagios CSP

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!
Python script to check and graph the delay in seconds from your primary to your hot standby PostgreSQL 9.3 server.
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.