Results 1 to 7 of 7

Thread: Failure Event Notification

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    4

    Failure Event Notification

    Good morning, I want to send an email when a host falls, I did not succeed, my files are:


    define host {
    use cisco
    alias apinformatica

    ap11hgcr host_name-p-0-076-i
    notifications_enabled 1
    event_handler_enabled 1
    address xx.xx.xx.xx
    max_check_attempts 5
    _SNMPCOMMUNITY xx
    check_command check_pin
    admin contacts
    check_interval 5
    retry_interval 1
    24x7 check_period
    notification_options d, u, r

    }

    define command {
    command_name notify-fall
    command_line / etc/perl/CPAN/prueba4.pl $ HOSTADDRESS $ $ $ NotificationType
    }

    define contact {
    use generic-contact
    contact_name admin
    email alvaespinosa@gmail.com
    pager 0600000000; contact phone number
    admin password
    is_admin 1

    24x7 host_notification_period
    host_notification_options d, u, r, f, s
    host_notification_commands notify-fall


    }

    The prueba4.pl script works, but when the host does not send it falls, what will happen? thanks

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Failure Event Notification

    Look for notification logs, there are plenty of ways for notification to not be send, especially with a new command.
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    4

    Re: Failure Event Notification

    where I can look?, I have watched the nagios. log but I can not know what happens

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Failure Event Notification

    Look at the schedulerd.log, it will output if the notification is raised, and if so, if the command failed.
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Junior Member
    Join Date
    Mar 2013
    Posts
    4

    Re: Failure Event Notification


    I pulled the access point 076 and the log is:


    2013-03-05 09:00:23,734 [Tue Mar 5 09:00:23 2013] SERVICE NOTIFICATION: admin;localhost;LocalMem;CRITICAL;notify-service-by-email;*** You must select to monitor either USED or FREE memory!

    2013-03-05 09:00:26,701 [Tue Mar 5 09:00:26 2013] Warning : the notification command '/usr/bin/printf "%b" "Shinken Notification\n\nNotification Type: PROBLEM\n\nService: LocalMem\nHost: generic-host\nAddress: localhost\nState: CRITICAL\n\nDate/Time: 05-03-2013 Additional Info : *** You must select to monitor either USED or FREE memory!\n" | /usr/bin/mail -s "** PROBLEM alert - generic-host/LocalMem is CRITICAL **" aespin@sesc.jc.es' raised an error (exit code=127) : '/bin/sh: 1: /usr/bin/mail: not found'

    2013-03-05 09:01:48,897 [Tue Mar 5 09:01:48 2013] SERVICE NOTIFICATION: admin;localhost;LocalCpu;CRITICAL;notify-service-by-email;[Errno 2] No such file or directory

    2013-03-05 09:01:48,920 [Tue Mar 5 09:01:48 2013] SERVICE NOTIFICATION: admin;localhost;LocalDisks;CRITICAL;notify-service-by-email;DISK CRITICAL - /home/alvas/.gvfs is not accessible: Permission denied

    2013-03-05 09:01:51,900 [Tue Mar 5 09:01:51 2013] Warning : the notification command '/usr/bin/printf "%b" "Shinken Notification\n\nNotification Type: PROBLEM\n\nService: LocalCpu\nHost: generic-host\nAddress: localhost\nState: CRITICAL\n\nDate/Time: 05-03-2013 Additional Info : [Errno 2] No such file or directory\n" | /usr/bin/mail -s "** PROBLEM alert - generic-host/LocalCpu is CRITICAL **" aespin@sesc.jc.es' raised an error (exit code=127) : '/bin/sh: 1: /usr/bin/mail: not found'

    2013-03-05 09:01:52,398 [Tue Mar 5 09:01:52 2013] Warning : the notification command '/usr/bin/printf "%b" "Shinken Notification\n\nNotification Type: PROBLEM\n\nService: LocalDisks\nHost: generic-host\nAddress: localhost\nState: CRITICAL\n\nDate/Time: 05-03-2013 Additional Info : DISK CRITICAL - /home/alvas/.gvfs is not accessible: Permission denied\n" | /usr/bin/mail -s "** PROBLEM alert - generic-host/LocalDisks is CRITICAL **" aespin@sesc.jc.es' raised an error (exit code=127) : '/bin/sh: 1: /usr/bin/mail: not found'

    schedulerd.log (END)


    Thanks.

  6. #6
    Junior Member
    Join Date
    Mar 2013
    Posts
    4

    Re: Failure Event Notification


    I also get this log but I pulled the ap receive nothing or no email:


    2013-03-05 09:04:57,104 [Tue Mar 5 09:04:57 2013] HOST NOTIFICATION: admin;ap11hgcr-p-0-035-i;DOWN;notificar-caida;PING CRITICAL - Packet loss = 100%

    2013-03-05 09:05:02,119 [Tue Mar 5 09:05:02 2013] HOST NOTIFICATION: admin;ap11hgcr-p-5-008-i;DOWN;notificar-caida;PING CRITICAL - Packet loss = 100%

  7. #7
    Junior Member
    Join Date
    Jul 2019
    Posts
    1
    Event notification is the way to get notification and get notified by the proper event building and maintain the event as well. The failure of the any type of careersbooster.com has the notice of failure in promotion of elongation and enhancement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •