Notifications Escalations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Notifications Escalations

Post by morabanc »

Hi guys,

We are having problems to send an sms when a service control fails.

If i test through prompt we get the sms successfully:

Code: Select all

/usr/local/nagios/libexec/sendsms.sh service <number>
But with nagios flux not.

My config is:

Serviceescalation

Code: Select all

define hostescalation {
    # config_name            host_dummy
    hostgroup_name           Host_Dummy_Escalation
    contacts                 MORABANC
    first_notification       1
    last_notification        3
    notification_interval    15
    escalation_period        24x7
}
HostGroup

Code: Select all

define hostgroup {
    hostgroup_name    Host_Dummy_Escalation
    alias             Host_Dummy_Escalation
    members           host_dummy
}
Commands

Code: Select all

define command {
    command_name    check_dummy
    command_line    $USER1$/check_dummy $ARG1$
}
define command {
    command_name    host-notify-by-sms
    command_line    $USER1$/sendsms.sh host $CONTACTPAGER$
}
define command {
    command_name    service-notify-by-sms
    command_line    $USER1$/sendsms.sh service $CONTACTPAGER$
}
Services

Code: Select all

define service {
    host_name                 host_dummy
    service_description       check_dummy
    use                       generic-service
    check_command             check_dummy!0!!!!!!!
    max_check_attempts        3
    check_interval            5
    retry_interval            5
    active_checks_enabled     0
    passive_checks_enabled    1
    check_period              24x7
    flap_detection_enabled    0
    notification_interval     60
    notification_period       24x7
    notification_options      w,c,u,r,
    notifications_enabled     1
    contacts                  MORABANC
    register                  1
}
Hosts

Code: Select all

define host {
    host_name                 host_dummy
    alias                     host_dummy
    address                   127.0.0.1
    hostgroups                Servidores
    check_command             check_dummy!0!!!!!!!
    max_check_attempts        3
    active_checks_enabled     0
    passive_checks_enabled    1
    check_period              24x7
    event_handler_enabled     1
    flap_detection_enabled    0
    contacts                  MORABANC
    notification_interval     60
    notification_period       24x7
    notification_options      d,u,r,
    notifications_enabled     1
    register                  1
}
Thanks for all
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Notifications Escalations

Post by cdienger »

The check_dummy command will always return OK and will not escalate as is. Try changing the check_dummy command to return CRITICAL instead by setting the value to 2.

Please provide a profile(Admin > System Config > System Profile > Download Profile) so we can get the entire config - the contact information is currently missing which could be the problem. If this is a Core system, please collect the /usr/local/nagios/etc directory which will have the full config.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Notifications Escalations

Post by morabanc »

Hi cdienger,

Thanks for your answer.

This is a NagiosXI 5.5.7 version.

Contact config is:

Code: Select all

define contact {
    contact_name                     MORABANC
    host_notification_period         24x7
    host_notification_commands       host-notify-by-sms
    service_notification_commands    service-notify-by-sms
    pager                            <telephone number>
}
define timeperiod {
    timeperiod_name         24x7
    alias                   24 Hours A Day, 7 Days A Week
    sunday                  00:00-24:00
    monday                  00:00-24:00
    tuesday                 00:00-24:00
    wednesday               00:00-24:00
    thursday                00:00-24:00
    friday                  00:00-24:00
    saturday                00:00-24:00
}
I attach you a pic refer to host notification, as you will see is empty (same result for service notification).

Also tailing nagios.log i didn't see anything refer sendsms.sh script configured in command.cfg:

tail -f /usr/local/nagios/var/nagios.log

Referring to uploading profile, I attach you too.


Thanks
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Notifications Escalations

Post by morabanc »

Hi guys,

We find the solution, we have 2 nagios in HA and notifications of second was disabled and all switch to first one.

omg....


Thanks for all!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Notifications Escalations

Post by cdienger »

Thanks for the update! :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked