Strange notification problem

Ilya Meylikhov rage_q3 at mail.ru
Mon May 5 08:06:46 CEST 2008


I've solved the problem - the CRITICAL state output of some services on this
host had more than 160 symbols - gnokii was unable to send an SMS that is
more than 160 symbols. Btw maybe anyone knows how to make gnokii send sms
which contains more than 160 symbols?

	Ilya.


-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Ilya
Meylikhov
Sent: Sunday, May 04, 2008 2:05 PM
To: 'Nagios Users Mailinglist'
Subject: [Nagios-users] Strange notification problem

Hello mailing list!
I have a very strange problem in my nagios configuration that I can't figure
out. If anybody could assist me in troubleshooting I'll be very grateful.
So the problem is that one of my service_notification_commands
(notify-service-by-sms) is not working for ONE (1) host when notifying about
CRITICAL state. The RECOVERY stats works fine for all hosts with this
command. It's realy strange because this same command works fine and
notifies me when I have service problems on other host for example for the
host ITNA I get both CRITICAL and RECOVERY states notified by sms on my
mobile phone. The notify-service-by-email works fine for all hosts for all
service stats. My configuration is in the end of my letter. The problem host
is "backup" and the working host is "itna". 


#########Contacts.cfg#########


define contact{
        contact_name                    nagiosadmin
        use                             generic-contact
        alias                           OA administrators
#        email                           all_oa at infosec.ru #commented for
testing purposeses
#        pager                           89165637274		#commented
for testing purposeses
}

define contact{
        contact_name                    Rustam
        use                             generic-contact
        alias                           Rustam Makhmudov
        pager                           89191054315
}

define contact{
        contact_name                    Ilya
        use                             generic-contact
        alias                           Ilya Meylikhov
        pager                           89165637274
}

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagiosadmin, Rustam, Ilya
        }


#########Templates.cfg#########


define contact{
        name                            generic-contact
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r,f,s
        host_notification_options       d,u,r,f,s
        service_notification_commands   notify-service-by-sms,
notify-service-by-email
        host_notification_commands      notify-host-by-sms,
notify-host-by-email
        register                        0
        }


define host{
        name                            linux-server
        use                             generic-host
        check_period                    24x7
        check_interval                  5
        retry_interval                  1
        max_check_attempts              10
        check_command                   check-host-alive
        notification_period             workhours
        notification_interval           120
        notification_options            d,u,r
        contact_groups                  admins
        register                        0
        }

define host{
        name                            generic-host
        notifications_enabled           1
        event_handler_enabled           1
        flap_detection_enabled          1
        failure_prediction_enabled      1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        notification_period             24x7
        register                        0
        }


define service{
        name                            generic-service         
        active_checks_enabled           1                       
        passive_checks_enabled          1                       
        parallelize_check               1                       
        obsess_over_service             1                       
        check_freshness                 0                       
        notifications_enabled           1                       
        event_handler_enabled           1                       
        flap_detection_enabled          1                       
        failure_prediction_enabled      1                       
        process_perf_data               1                       
        retain_status_information       1                       
        retain_nonstatus_information    1                       
        is_volatile                     0                       
        check_period                    24x7                    
        max_check_attempts              3                       
        normal_check_interval           5                       
        retry_check_interval            1                       
        contact_groups                  admins                  
        notification_options            w,u,c,r                 
        notification_interval           90                      
        notification_period             24x7                    
         register                        0                      
        }


#########Hosts.cfg#########


define host{
use linux-server
host_name itna
alias ITNA (Infosec mail relay server #1)
address 192.168.200.51
}

define host{
use linux-server
host_name backup
alias Checkpoint Backup Server
address 192.168.210.11
}


#########Commands.cfg#########


define command{
        command_name notify-host-by-sms
        command_line echo "Host [$HOSTNAME$ $HOSTALIAS$] status:$HOSTOUTPUT$
[$LONGDATETIME$]" |gnokii --sendsms $CONTACTPAGER$ >>
/usr/local/nagios/var/gnokii.log 2>&1
        }

define command{
        command_name notify-service-by-sms
        command_line echo "Host [$HOSTNAME$ $HOSTALIAS$] service
[$SERVICEDESC$] status [$SERVICESTATE$:$SERVICEOUTPUT$] [$LONGDATETIME$]"
|gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log 2>&1
        }


#########Services.cfg#########

#ITNA HOST

define service{
use generic-service
host_name itna
service_description Current Users
check_command check_nrpe!check_users
}


define service{
use generic-service
host_name itna
service_description /dev/sda1 Free Space
check_command check_nrpe!check_sda1
}


define service{
use generic-service
host_name itna
service_description /dev/sda7 Free Space
check_command check_nrpe!check_sda7
}

define service{
use generic-service
host_name itna
service_description /dev/hda4 Free Space
check_command check_nrpe!check_sda4
}

define service{
use generic-service
host_name itna
service_description /dev/sda5 Free Space
check_command check_nrpe!check_sda5
}

define service{
use generic-service
host_name itna
service_description /dev/sda2 Free Space
check_command check_nrpe!check_sda2
}


#BACKUP HOST


define service{
use generic-service
host_name backup
service_description Check RAID /dev/md0
check_command check_by_ssh_disk_md0
}

define service{
use generic-service
host_name backup
service_description Check RAID /dev/md1
check_command check_by_ssh_disk_md1
}

define service{
use generic-service
host_name backup
service_description Check RAID /dev/md2
check_command check_by_ssh_disk_md2
}

define service{
use generic-service
host_name backup
service_description Check RAID /dev/md3
check_command check_by_ssh_disk_md3
}

define service{
use generic-service
host_name backup
service_description Check RAID /dev/md5
check_command check_by_ssh_disk_md5
}

define service{
use generic-service
host_name backup
service_description Check ammount of users
check_command check_by_ssh_users
}

define service{
use generic-service
host_name backup
service_description Check Load
check_command check_by_ssh_load
}

define service{
use generic-service
host_name backup
service_description Check Raid Health
check_command check_md_raid



Log messages:

[1209895271] SERVICE NOTIFICATION: Ilya;backup;Check Raid Health;CUSTOM
(CRITICAL);notify-service-by-email;RAID CRITICAL: 1 array not ok - Array MD3
is in state clean, degraded (raid1) [6 arrays checked];OA administrators;.
[1209895271] SERVICE NOTIFICATION: Ilya;backup;Check Raid Health;CUSTOM
(CRITICAL);notify-service-by-sms;RAID CRITICAL: 1 array not ok - Array MD3
is in state clean, degraded (raid1) [6 arrays checked];OA administrators;.
[1209895272] SERVICE NOTIFICATION: Rustam;backup;Check Raid Health;CUSTOM
(CRITICAL);notify-service-by-email;RAID CRITICAL: 1 array not ok - Array MD3
is in state clean, degraded (raid1) [6 arrays checked];OA administrators;.
[1209895272] SERVICE NOTIFICATION: Rustam;backup;Check Raid Health;CUSTOM
(CRITICAL);notify-service-by-sms;RAID CRITICAL: 1 array not ok - Array MD3
is in state clean, degraded (raid1) [6 arrays checked];OA administrators;.
[1209895272] SERVICE NOTIFICATION: nagiosadmin;backup;Check Raid
Health;CUSTOM (CRITICAL);notify-service-by-email;RAID CRITICAL: 1 array not
ok - Array MD3 is in state clean, degraded (raid1) [6 arrays checked];OA
administrators;.
[1209895272] SERVICE NOTIFICATION: nagiosadmin;backup;Check Raid
Health;CUSTOM (CRITICAL);notify-service-by-sms;RAID CRITICAL: 1 array not ok
- Array MD3 is in state clean, degraded (raid1) [6 arrays checked];OA
administrators;.






The only difference between backup host and itna host is that one monitored
by nrpe plugin and the other is monitored by check_by_ssh plugin. Could it
be the problem?
My system is: Nagios 3.05b under Linux Debian 4 2.6.18-6-686, nrpe-2.10.





Thanks in advance,
			Ilya.



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao
ne
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list