Notification Issues (SMS)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
jamie87
Posts: 9
Joined: Thu Jul 11, 2024 9:18 am

Notification Issues (SMS)

Post by jamie87 »

Hi,

I have added a service to monitor that i can enable/disable to test notifications but having a little fun with it that someone can hopefully help me with.

Email Notifications are coming through to me fine for both Host and Service however SMS notifications only come through for Host notifications.

1. I created a script to send SMS' on the server
2. Created a command in CCM called "notify-host-by-sms"
3. Updated my contact to include notify-host-by-sms in the host notifications

This works, but when doing the same for a new command called "notify-service-by-sms" i don't get service notifications via SMS?

I added the notify-service-by-sms to my contacts manage service notification commands.
Do i need to do something else to make this work for Service Notifications?

If i add the notify-host-by-sms into the service alert commands, i get SMS alerts but they currently just say "PROBLEM Host Alert - MY-SERVER-01 is UP" as its configured with "Host" vaiables rather than "Service" variables

The command for the alerts are:
Host Alert

Code: Select all

/usr/local/bin/send_sms.sh "$CONTACTPAGER$" "Host Alert: $HOSTALIAS$ is $HOSTSTATE$ - Info: $HOSTOUTPUT$"
Service Alert

Code: Select all

/usr/local/bin/send_sms.sh "$CONTACTPAGER$" "Service Alert: $SERVICEDESC$ on $HOSTALIAS$ is $SERVICESTATE$
Regards,
Jamie
jamie87
Posts: 9
Joined: Thu Jul 11, 2024 9:18 am

Re: Notification Issues (SMS)

Post by jamie87 »

Got it working, it was an issue with my SMS script, not sure why hosts worked but services didn't be i needed to wrap a couple variables in quotes, since that, it's working great.
sgardil
Posts: 327
Joined: Wed Aug 09, 2023 9:58 am

Re: Notification Issues (SMS)

Post by sgardil »

jamie87 wrote: Mon Jul 15, 2024 6:09 am Got it working, it was an issue with my SMS script, not sure why hosts worked but services didn't be i needed to wrap a couple variables in quotes, since that, it's working great.
I'm glad you figured it out. The reason why services didnt work and hosts did, at least from the scripts you posted, is because of the quotes wrapping. You're service line had a starting quotation however it didn't have the wrapping quote needed. Those are always fun to troubleshoot if you don't catch them right away. Let us know if we can help with anything else.
Post Reply