SMS Notification for service recovery

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

SMS Notification for service recovery

Postby morabanc » Wed Jan 09, 2019 11:50 am

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
morabanc
 
Posts: 198
Joined: Tue Jul 10, 2012 8:14 am

Re: SMS Notification for service recovery

Postby npolovenko » Wed Jan 09, 2019 4:15 pm

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.
User avatar
npolovenko
Support Tech
 
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: SMS Notification for service recovery

Postby morabanc » Mon Jan 14, 2019 2:25 am

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
morabanc
 
Posts: 198
Joined: Tue Jul 10, 2012 8:14 am

Re: SMS Notification for service recovery

Postby npolovenko » Mon Jan 14, 2019 5:14 pm

@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.
User avatar
npolovenko
Support Tech
 
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: SMS Notification for service recovery

Postby morabanc » Tue Jan 15, 2019 6:28 am

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 :)
morabanc
 
Posts: 198
Joined: Tue Jul 10, 2012 8:14 am

Re: SMS Notification for service recovery

Postby scottwilkerson » Tue Jan 15, 2019 6:00 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14847
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios XI

Who is online

Users browsing this forum: jkmoseley, ScottMc and 11 guests

cron