From a343439315023ecf7409748ef07d86fc007d388e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 3 Oct 2021 17:30:47 +0100 Subject: Add PostgreSQL replication check --- nagios/objects/cluster.cfg | 6 ++++++ nagios/objects/commands.cfg | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'nagios') diff --git a/nagios/objects/cluster.cfg b/nagios/objects/cluster.cfg index aa4db76..e65b9e6 100644 --- a/nagios/objects/cluster.cfg +++ b/nagios/objects/cluster.cfg @@ -206,6 +206,12 @@ define service { service_description PostgreSQL check_command check_pgsql } +define service { + use local-service + host_name virtualip + service_description PostgreSQL replication + check_command check_pg_repl +} define service { use local-service hostgroup_name linux-servers diff --git a/nagios/objects/commands.cfg b/nagios/objects/commands.cfg index 4a0fdee..5e1fa15 100644 --- a/nagios/objects/commands.cfg +++ b/nagios/objects/commands.cfg @@ -139,6 +139,11 @@ define command { command_line $USER1$/check_pgsql -H $HOSTADDRESS$ -l postgres } +define command { + command_name check_pg_repl + command_line $USER1$/check_pgactivity -h firebrand,defiant -s hot_standby_delta -U postgres +} + define command { command_name check_mysql command_line $USER1$/check_mysql -H $HOSTADDRESS$ -P 13306 -S -w 10 -c 60 -u nagios -p r3pl -- cgit v1.2.3