SMS Notification for service recovery

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

SMS Notification for service recovery

Post by morabanc »

Hi guys,

We noticed that when a service fails (critical or warning) we get an sms + email notification but not when recover (ok) only receive email notification.

Service:

Code: Select all

define service {
    host_name                srvDDD
    service_description      Disco O
    use                      generic-service
    check_command            check_nrpe_disk!o!95!98
    notification_period      workhours_srvDDD
    register                 1
}
Serviceescalation lvl1:

Code: Select all

define serviceescalation {
    # config_name            lvl1_srvDDD
    host_name                srvDDD
    service_description      Disco O
    contacts                 David
    contact_groups           contact-Mail
    first_notification       1
    last_notification        3
    notification_interval    15
    escalation_period        24x7
}
Serviceescalation lvl2:

Code: Select all

define serviceescalation {
    # config_name            lvl2_srvDDD
    host_name                srvDDD
    service_description      Disco O
    contact_groups           contact,contact-Mail
    first_notification       4
    last_notification        0
    notification_interval    15
    escalation_period        24x7
}
Contact:

Code: Select all

define contact {
    contact_name                     David
    alias                            David
    host_notifications_enabled       1
    service_notifications_enabled    1
    host_notification_period         24x7
    service_notification_period      24x7
    host_notification_options        d,u,r,
    service_notification_options     w,u,c,r,
    host_notification_commands       host-notify-by-sms
    service_notification_commands    service-notify-by-sms
    pager                            <telephone...>
    use                              generic-contact
}

Thanks
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: SMS Notification for service recovery

Post by npolovenko »

Hello, @morabanc. What are you using to send out SMS messages? A built-in sms script or a physical device? Can you click on the XI username at the top right corner, then click on the Notifications Preferences in the left column and make sure that Host Recovery SMS notification box is checked and Service Recovery SMS notification box is checked as well.
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: SMS Notification for service recovery

Post by morabanc »

Hi npolovenko,

Sorry for the late.

We are using a gsm module integrated in the physical server which are NagiosXi installed.

This sms notifications is defined at commands like this:

host-notify-by-sms

Code: Select all

echo "Host Alert: $HOSTNAME$. Host State: $HOSTSTATE$. Date/Time: $LONGDATETIME$. Desc: $HOSTOUTPUT$" | gammu-smsd-inject TEXT $CONTACTPAGER$
service-notify-by-sms

Code: Select all

echo "Service Alert: $HOSTNAME$/$SERVICEDESC$. Service State: $SERVICESTATE$. Date/Time: $LONGDATETIME$. Desc: $SERVICEOUTPUT$" | gammu-smsd-inject TEXT $CONTACTPAGER$
At nagios we only have "nagiosadmin" user, then at contacts we have all people that may receive sms.
I check Nagiosadmin preferences and all check box ara marked.

Let me know if you need some additional information.


Appreciate your help,
Thanks
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: SMS Notification for service recovery

Post by npolovenko »

@morabanc, I see that you have two service escalations. The first one is using the SMS contact "David" but the second escalation is using two contact groups. If your SMS contacts are not a part of those contact groups in the second escalation, they will not receive SMS notifications either. Can you try assigning the contact David to the second escalation?
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: SMS Notification for service recovery

Post by morabanc »

Hi npolovenko,

Thanks for your advice but I solved the problem.

All config are ok but our script don't work correctly and won't send sms when they receive a Recovery flag ($NOTIFICATIONTYPE$).


Thanks a lot to all :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SMS Notification for service recovery

Post by scottwilkerson »

morabanc wrote:Hi npolovenko,

Thanks for your advice but I solved the problem.

All config are ok but our script don't work correctly and won't send sms when they receive a Recovery flag ($NOTIFICATIONTYPE$).


Thanks a lot to all :)
glad to hear it is resolved!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked