Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
# 'check_bruce_daemon' command definition
                                                          
define command {
       command_name     check_bruce_daemon
       command_line     $USER1$/check_procs -w 1:1 -c 1:1 -a com.netblue.bruce.Main
}

...

No Format
# Define a service that will check for the replication daemon

                                     

define service {
       use                              local-service           ; service template to user
       host_name                        localhost
       service_description              bruce daemon
       check_command                    check_bruce_daemon
}

...

No Format
# 'check_pgserver' command definition
                                                              
define command {
       command_name     check_pgserver
       command_line     $USER1$/check_pgsql -H $HOSTADDRESS$ -P $ARG1$ -d $ARG2$
}

...

No Format
# Define a service to monitor for the bruce_config postgresql server and database

                 

define service {
       use                              local-service           ; service template to use
       host_name                        localhost
       service_description              bruce_config DB
;                                                      port database name
       check_command                    check_pgserver!5432!bruce_config
}

...

Monitoring for replication lag

The custom check_bruce_lag plugin is used in this monitor. To create this plugin, change directories to the Nagios plugins directory (often either /usr/lib/nagios/plugins or /usr/local/nagios/libexec), and execute this script:

...

No Format
# 'check_bruce_lag' command definition
                                                             
define command {
       command_name     check_bruce_lag
       command_line     $USER1$/check_bruce_lag $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ 60 300
}

...

No Format
# Define a service to monitor for snapshot lag on the bruce_master database

                       

define service {
       use                              local-service           ; service template to use
       host_name                        localhost
       service_description              bruce_master lag
;                                                           clusterid
;                                                       type   | port database name
       check_command                    check_bruce_lag!MASTER!1!5432!bruce_master
}

...

No Format
# Define a service to monitor for snapshot lag on the bruce_slave_02 database

                     

define service {
       use                              local-service           ; service template to use
       host_name                        localhost
       service_description              bruce_slave_02 lag
;                                                         clusterid
;                                                       type  | port database name
       check_command                    check_bruce_lag!SLAVE!1!5432!bruce_slave_02
}