Page 1 of 1

sms FoxBox

Posted: Mon Sep 26, 2016 12:10 pm
by hass
I have managed to follow all the instructions to adding the foxbox plugin. However it still does not seems to be sending out any alerts via text messages

can any one shed some light on this?

Re: sms FoxBox

Posted: Mon Sep 26, 2016 12:17 pm
by tmcdonald
For reference, are you referring to this?

https://exchange.nagios.org/directory/P ... ts/details

Are you receiving any errors in your system logs? What happens if you run the command manually from the command line to test?

Re: sms FoxBox

Posted: Mon Sep 26, 2016 12:40 pm
by hass
yes i am referring to that documentation

sorry im quite new to this, so you will have to bear with me if i ask questions which seem too simple

no error messages regarding this issue.
which command are we referring to and how can i run this manually?

Re: sms FoxBox

Posted: Mon Sep 26, 2016 3:51 pm
by rkennedy
Based on how it has you define your commands, you may need to edit them -

Code: Select all

command_line /usr/lib/nagios/plugins/sendSMS.sh -h "127.0.0.1" -u "nagiosadmin" -pw "nagios" -n "$CONTACTPAGER$" -m "Service Alert: $HOSTALIAS$/$SERVICEDESC$ nService State: $SERVICESTATE$ nDate/Time: $LONGDATETIME$" 
Based on the documentation on the page above, to test over the CLI, try something like this -

Code: Select all

/usr/lib/nagios/plugins/sendSMS.sh -h "127.0.0.1" -u "nagiosadmin" -pw "nagios" -n "CONTACTNUMBER" -m "Test message" 
(replace CONTACTNUMBER) with a valid number to dial.

Re: sms FoxBox

Posted: Tue Sep 27, 2016 6:48 am
by hass
i have just also noticed that the file structure on the nagios server is different to whats documented:
/usr/lib/nagios/plugins/ - this directory does not exists!!

and with regards to the amendments that need to be made to the commands.cfg file. is this the file that is located in :
/usr/local/nagios/etc?

as this file clearly states that any changes will be overwritten by CCM

Re: sms FoxBox

Posted: Tue Sep 27, 2016 10:16 am
by rkennedy
Nice catch, I didn't realize this was an XI post.

You'd want to adjust the command definition to /usr/local/nagios/etc in the CCM. You can modify your existing commands by navigating to Configure -> Core Config Manager -> Commands -> Find the notification commands you created for the sendSMS.sh plugin -> Adjust the path to be correct.