We were looking for a way of sending/acknowledging alerts through sms in nagios core/nagios XI when i ran into the following article found in the linux journal.
http://www.linuxjournal.com/files/linux ... Nagios.pdf
We purchased the iSMS device and were very happy to find out that Nagios XI had a component for it already. Installation and setup was easy and sending alerts is working great. In the article it has a method by which you can acknowledge the alerts by sending the SMS back to the iSMS device with ACK or ACKNOWLEDGE at the top of the message. The nagios XI component does not seem to work in the same way.
Does the Nagios XI iSMS component have acknowledge capabilities, and if it doesn't will it have them in the future?
We are very interested in having this capability.
iSMS acknowledge alerts
Re: iSMS acknowledge alerts
First questions is whether the iSMS smsack.cgi was installed on the Nagios server and whether the iSMS is hitting it.
Can you hit the smsack.cgi page on your Nagios server with a browser?
Assuming a standard log location, can you run the following on your Nagios console:
tail -f /var/log/httpd/access_log | grep "smsack.cgi"
Then acknowledge a SMS alert and see if anything happens. That will tell you if the iSMS is even hitting the Nagios server with the http request.
Can you hit the smsack.cgi page on your Nagios server with a browser?
Assuming a standard log location, can you run the following on your Nagios console:
tail -f /var/log/httpd/access_log | grep "smsack.cgi"
Then acknowledge a SMS alert and see if anything happens. That will tell you if the iSMS is even hitting the Nagios server with the http request.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: iSMS acknowledge alerts
Keep in mind that the smsack.cgi is not included in the component, it would have to be gotten through the link on the linux journal page.
Re: iSMS acknowledge alerts
I was really interested in this myself and am considering doing this as well. First off though, we are (hopefully) enabling reverse proxy into nagiosmobile tomorrow sometime and that would negate the need for acknowledge through SMS or even email.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: iSMS acknowledge alerts
No we didn't get the smsack.cgi, I will implement that and let you know how it goes.slansing wrote:Keep in mind that the smsack.cgi is not included in the component, it would have to be gotten through the link on the linux journal page.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: iSMS acknowledge alerts
Once you do, and can reach it through a browser, you can go to the multitech GUI and then
SMS Services-> Receive API
(your location may differ)
And then fill in the information.
SMS Services-> Receive API
(your location may differ)
And then fill in the information.
Re: iSMS acknowledge alerts
Steps for acknowledgements through iSMS device.
create following httpd config:
smsfinder.conf
----------------------------------------------------------
#modify this file to fit your apache configuration
Alias /smsfinder "/usr/local/smsack/bin"
<Directory "/usr/local/smsack/bin">
# SSLRequireSSL
Options ExecCGI
AllowOverride All
Order allow,deny
Allow from all
# Allow from XXX.XXX.XXX.XXX
</Directory>
----------------------------------------------------------
You may have to enable cgi extensions in the http.conf
Create the following directories.
/usr/local/smsack
/usr/local/smsack/bin
/usr/local/smsack/var
make them read and writable to your web server.
Rename smsack.txt to smsack.cgi (would not allow me to upload a cgi script)
Copy the smsack.cgi script attached into /usr/local/smsack/bin/
Configure the iSMS device.
SMS Service > SMS API
Non Polling Receive API Status enable
Protocol HTTP
Server <ip of nagios server>
Server Default page smsfinder/smsack.cgi
Send encoding flag enable
Save & Restart
You will be able to ACK or set OK on hosts and servers using the iSMS device. Just reply with the original message with ACK or OK at the top of the message.
create following httpd config:
smsfinder.conf
----------------------------------------------------------
#modify this file to fit your apache configuration
Alias /smsfinder "/usr/local/smsack/bin"
<Directory "/usr/local/smsack/bin">
# SSLRequireSSL
Options ExecCGI
AllowOverride All
Order allow,deny
Allow from all
# Allow from XXX.XXX.XXX.XXX
</Directory>
----------------------------------------------------------
You may have to enable cgi extensions in the http.conf
Create the following directories.
/usr/local/smsack
/usr/local/smsack/bin
/usr/local/smsack/var
make them read and writable to your web server.
Rename smsack.txt to smsack.cgi (would not allow me to upload a cgi script)
Copy the smsack.cgi script attached into /usr/local/smsack/bin/
Configure the iSMS device.
SMS Service > SMS API
Non Polling Receive API Status enable
Protocol HTTP
Server <ip of nagios server>
Server Default page smsfinder/smsack.cgi
Send encoding flag enable
Save & Restart
You will be able to ACK or set OK on hosts and servers using the iSMS device. Just reply with the original message with ACK or OK at the top of the message.
You do not have the required permissions to view the files attached to this post.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: iSMS acknowledge alerts
Awesome thank you for this contribution!
Re: iSMS acknowledge alerts
I'm testing these simple instructions right now....will report back.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: iSMS acknowledge alerts
I have two issues.
1.) How do I reply and tell the phone to send the original message as well, hehe
2.) receiving this error in my sms log:
I'm still troubleshooting, will reply if I figure out #2. #1, i am sure there is just a simple option on my phone.
1.) How do I reply and tell the phone to send the original message as well, hehe
2.) receiving this error in my sms log:
Code: Select all
Nov 14 16:07:18 boa: recvfaillog: Failed to send non-polling message. Will attempt to resend later.
Nov 14 16:07:48 boa: recvfaillog: NON-POLLING RECEIVE API DELIVERY FAILED: Error reading response from server.
Nov 14 16:07:48 boa: recvfaillog: HTTP NON-POLLING RECEIVE API DELIVERY FAILED: Failed to connect to server.
Nov 14 16:07:48 boa: recvfaillog: HTTP Non-Polling Receive API message that failed:
XMLDATA=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22ISO-8859-1%22%3F%3E%0D%0A%3CResponse%3E%0D%0A%3CMsg_Count%3E1%3C%2FMsg_Count%3E%0D%0A%3CMessageNotification%3E%0D%0A%3CMessage_Index%3E1%3C%2FMessage_Index%3E%0D%0A%3CModemNumber%3E1%3C%2FModemNumber%3E%0D%0A%3CSenderNumber%3E%2B17402782037%3C%2FSenderNumber%3E%0D%0A%3CDate%3E12%2F11%2F14%3C%2FDate%3E%0D%0A%3CTime%3E16%3A04%3A02%3C%2FTime%3E%0D%0A%3CEncodingFlag%3EASCII%3C%2FEncodingFlag%3E%0D%0A%3CMessage%3EAck%3C%2FMessage%3E%0D%0A%3C%2FMessageNotification%3E%0D%0A%3C%2FResponse%3E
Nov 14 16:07:48 boa: recvfaillog: Non-Polling Post Failed to Send. Will try again later.2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github