iSMS acknowledge alerts
Re: iSMS acknowledge alerts
hockad,
I didn't have ExecCgi enabled, so I added that to my Directory options and also enabled cgi running outside cgi-bin folder. My sms device is still getting same errors. However, if I manually browse to http://server/smsfinder/smsack.cgi I now get "Internal Service Error" instead of it actually showing the contents of the script before I added the ExecCGI. Any dealings with this issue in your deployment?
I didn't have ExecCgi enabled, so I added that to my Directory options and also enabled cgi running outside cgi-bin folder. My sms device is still getting same errors. However, if I manually browse to http://server/smsfinder/smsack.cgi I now get "Internal Service Error" instead of it actually showing the contents of the script before I added the ExecCGI. Any dealings with this issue in your deployment?
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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: iSMS acknowledge alerts
I believe you must forward the message to the SMS device's number with ACK or OK at the front of the message. At least that's what I've been attempting..to no avail 

Re: iSMS acknowledge alerts
LOL, glad to see someone else suffering with me. I can't get mine past trying to connect to nagios server. Still getting error in logs on sms device that I posted earlier.slansing wrote:I believe you must forward the message to the SMS device's number with ACK or OK at the front of the message. At least that's what I've been attempting..to no avail
Good luck! (Then you can make it part of the component)
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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: iSMS acknowledge alerts
Bandit have you checked your line endings for the cgi file? They may be in windows format.
I am now getting this:
Lines 45, 48, 52, 54, 62, 67, 74, and 75 as noted above. A combination of $SenderNumber, Concatenation, and $Message. Going to do some more digging if time provides tomorrow, but it seems the instructions may not be totally complete yet 
I am now getting this:
Code: Select all
smsack.cgi: Use of uninitialized value $SenderNumber in pattern match (m//) at /usr/local/smsack/bin/smsack.cgi line 75.

Re: iSMS acknowledge alerts
Well, I didn't have some of the perl modules installed. used cpan to install CGI::Carp, XML::Simple and Data::Dumper.
It still isn't working, but at least I have those installed. Still getting the internal server error if I call the cgi and in the logs on the sms device I am still getting the same errors I posted earlier. I'm not resting until I figure out what I am missing.
It still isn't working, but at least I have those installed. Still getting the internal server error if I call the cgi and in the logs on the sms device I am still getting the same errors I posted earlier. I'm not resting until I figure out what I am missing.
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
Code: Select all
[Thu Nov 15 09:22:37 2012] [error] [client 10.96.26.50] (2)No such file or directory: exec of '/usr/local/smsack/bin/smsack.cgi' failed
[Thu Nov 15 09:22:37 2012] [error] [client 10.96.26.50] Premature end of script headers: smsack.cgi
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
Just to update on my progress. I got past the error by adding a "-w" to the end of the first line, the /usr/bin/perl line.
Now my iSMS sends messages to to my nagios server and gets an OK back. The nagios server is not doing anything with the messages, don't think it likes what it is being sent. Still figuring it out, just updating anyone that may be following this thread.
Now my iSMS sends messages to to my nagios server and gets an OK back. The nagios server is not doing anything with the messages, don't think it likes what it is being sent. Still figuring it out, just updating anyone that may be following this thread.
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
Mine is now working....as long as there is not a space in the host or service name. Trying to make sense of the code so I can hopefully fix that issue, then I'll be 100% satisfied.
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
Here is the part of the code getting the host and service name:
I can't figure out how to change it to accoutn for spaces in host and or service names. For host name, just read until the "/" and service name read until the word "Problem" would work, but this is above my perl skill level. Hopefully the author can resolve.
Code: Select all
# Grab the host name and service
my $alerttype = '';
my $host = '';
my $service = '';
if ($Message =~ m/\w+\s+(\w+)\s+\/\s+(\w+)/)
{
$alerttype = 'ServiceAlert' if $2 ne '';
$host = $1;
$service = $2;
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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: iSMS acknowledge alerts
Awesome, did you ever get the following error?
Code: Select all
smsack.cgi: Use of uninitialized value $SenderNumber in pattern match (m//) at /usr/local/smsack/bin/smsack.cgi line 75.
Code: Select all
smsack.cgi: Use of uninitialized value $Message in pattern match (m//) at /usr/local/smsack/bin/smsack.cgi line 62.