Multiple Critical condition alert
Posted: Sat Sep 21, 2019 11:34 pm
Hi,
I'm using the check_mysql_all from https://github.com/shamil/nagios-plugin ... _mysql_all
It has 3 states of critical
CRITICAL: Slave is 7095697 seconds behind master
CRITICAL: IO_Thread Not Running
CRITICAL: SQL_Thread Not Running
As of now the current state is "Salve is behind master". If I stop the slave service (stop slave;) I sometimes get a alert stating "SQL IO is not running". Once I start the slave (start slave;) I don't get another alert saying it is still in critical state (CRITICAL: Slave is 7095697 seconds behind master). Does the service not notify that during every critical states? Or should I be configuring something somewhere?
The reason is mysql slave is far behind and I'd nagios to alert me about all stages so I could ensure that mysql slave sync's up or breaks.
Content of commands/mysql.cfg
Contennt of services/services.mysql.cfg
Content of services/services.cfg
Thanks
I'm using the check_mysql_all from https://github.com/shamil/nagios-plugin ... _mysql_all
It has 3 states of critical
CRITICAL: Slave is 7095697 seconds behind master
CRITICAL: IO_Thread Not Running
CRITICAL: SQL_Thread Not Running
As of now the current state is "Salve is behind master". If I stop the slave service (stop slave;) I sometimes get a alert stating "SQL IO is not running". Once I start the slave (start slave;) I don't get another alert saying it is still in critical state (CRITICAL: Slave is 7095697 seconds behind master). Does the service not notify that during every critical states? Or should I be configuring something somewhere?
The reason is mysql slave is far behind and I'd nagios to alert me about all stages so I could ensure that mysql slave sync's up or breaks.
Content of commands/mysql.cfg
Code: Select all
# check_mysql_all_slave command definition
define command{
command_name check_mysql_all_slave
command_line $USER2$/check_mysql_all -K repl_all -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ $ARG3$
}Code: Select all
define service{
name mysql-email
use email-service
servicegroups mysql
register 0
host_name mysql_.*
}
define service{
use mysql-email
service_description MySQL Slave Status
check_command check_mysql_all_slave!$USER4$!$USER5$!
host_name mysql_db_001 ; Slaves only
}
Code: Select all
# Generic service definition template
define service{
name generic-service ; The 'name' of this service template, referenced in other service definitions
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0
check_period 24x7
max_check_attempts 3 ;
normal_check_interval 3 ;
retry_check_interval 1 ;
contact_groups admin
notification_interval 6
notification_period 24x7
notification_options w,u,c,r
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
define service{
use generic-service
name email-service
}Thanks