Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
contactgroups.cfg:
define contactgroup{
contactgroup_name sagroup
alias Nagios Administrators
members nagiosadmin
}
run "/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg", there was no errors and warnings.
SMS configuration is:
# 'notify-service-by-sms' command definition
define command{
command_name service-by-sms
command_line /bin/echo -n "$NOTIFICATIONTYPE$ $HOSTNAME$/$HOSTADDRESS$:Service is $SERVICESTATE$\nDate/Time: $LONGDATETIME$" | /usr/bin/gnokii --sendsms 13818888**** 2>&1 > /dev/null
}
I use commands to test mail and gnokii, they are working well.
max_check_attempts: This directive is used to define the number of times that Nagios will retry the host check command if it returns any state other than an OK state. Setting this value to 1 will cause Nagios to generate an alert without retrying the host check. Note: If you do not want to check the status of the host, you must still set this to a minimum value of 1. To bypass the host check, just leave the check_command option blank.
Your service would have had to have been checked 3 times before an alert was generated, is this consistent with the OK and warning/critical state change timestamps?
Also, what version of Nagios are you using? There are a number of examples on this page as far as correctly building host/service configuration files:
Some of your check settings seem a bit strange, "normal_check_interval" as opposed to "check_interval." You 'should' be able to use both, but the newest definition options can be found on that page.