Page 1 of 2

Notify by SMS

Posted: Thu Sep 05, 2019 12:43 pm
by t3dus
I created a new command to notify me via SMS of alerts and I'm trying to keep the notifications short but sweet. I've done this with core before and it works great however when I try the same with NagiosXI I only receive stuff like "DEV1 is up" which tells me NOTHING about the actual problem.

I've spent over an hour already trying different variables and still haven't found one that sends me the actual problem with the service or host.

Can somebody point out to me what I'm doing wrong...

Current configs below
config1.PNG
However when I get a service notification it only gives me this.
Screenshot_20190905-131405_Messages.jpg
Totally not useful! I want to know what the actual problem is!

Re: Notify by SMS

Posted: Thu Sep 05, 2019 2:16 pm
by scottwilkerson
Your notify-host-by-sms command doesn't have the $HOSTOUTPUT$ macro, so if you are testing with a host it is only going to display the info you have in the command.

Re: Notify by SMS

Posted: Thu Sep 05, 2019 2:44 pm
by t3dus
scottwilkerson wrote:Your notify-host-by-sms command doesn't have the $HOSTOUTPUT$ macro, so if you are testing with a host it is only going to display the info you have in the command.
The test I showed was with a service. Doesn't show me the information I want to see. I'll see what adding the $HOSTOUTPUT$ does for me though.

Re: Notify by SMS

Posted: Thu Sep 05, 2019 3:11 pm
by scottwilkerson
t3dus wrote:
scottwilkerson wrote:Your notify-host-by-sms command doesn't have the $HOSTOUTPUT$ macro, so if you are testing with a host it is only going to display the info you have in the command.
The test I showed was with a service. Doesn't show me the information I want to see. I'll see what adding the $HOSTOUTPUT$ does for me though.
If it was a service, then you added the the host notification command in the service spot on the contact

It should be like this

Code: Select all

define contact {
....
    host_notification_commands       notify-host-by-sms
    service_notification_commands    notify-service-by-sms
....
}

Re: Notify by SMS

Posted: Thu Sep 05, 2019 3:31 pm
by t3dus
Can you explain how to do that in NagiosXI via the interface. I'm not manually editing config files directly like I do in Nagios Core

Thanks

Re: Notify by SMS

Posted: Thu Sep 05, 2019 3:42 pm
by scottwilkerson
CCM -> Contacts -> Edit Contact -> Alert Settings Tab

Manage Host Notification Commands -> Select notify-host-by-sms
Close

Manage Service Notification Commands -> Select notify-service-by-sms
Close

Save

Apply Configuration

This is how you add/change notification handlers

Re: Notify by SMS

Posted: Thu Sep 05, 2019 10:38 pm
by t3dus
Oh I've already done that...

Re: Notify by SMS

Posted: Thu Sep 05, 2019 10:52 pm
by t3dus
Adding $HOSTOUTPUT$ just gives me more useless information.
Screenshot_20190905-224901_Messages.jpg
I'm expecting to see something like this..

Code: Select all

Notification Type: PROBLEM

Service: Drive C: Disk Usage
Host: Dev1
Address: 192.168.1.75
State: WARNING
but in a nice clean version for mobile. If I send the e-mails using the standard template to my phone it gets broken up into two different messages which is super annoying.
20190905_225532.jpg

Re: Notify by SMS

Posted: Fri Sep 06, 2019 6:50 am
by scottwilkerson
Again, this like the $HOSTOUTPUT$ is being displayed on the service notification handler

Can you send a system profile from Admin -> System Profile and I can take a look

Thanks

Re: Notify by SMS

Posted: Fri Sep 06, 2019 8:55 am
by t3dus
I have attached the profile.

This is an older version of Nagios XI Version 5.4.0 to be exact. We tried to upgrade it but it always fails and we haven't got around to building an entire new nagios server.