iSMS acknowledge alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: iSMS acknowledge alerts

Post by BanditBBS »

Here is the fixed part of the code:

Code: Select all

if ($Message =~ m/\w+\s+(\w+)\s+\/\s+([\w\s]+)/){
        $alerttype = 'ServiceAlert' if $2 ne '';
        $host      = $1;
        $service   = $2;
        $service =~ s/[A-Z]{2,}.$//;
        $service =~ s/\s+$//;
}elsif ($Message =~ m/\w+\s+(\w+)/){
        $alerttype = 'HostAlert';
        $host   =$1;
}
That fixes the code for spaces in service names.

No, i never received any of those errors. Once I got the script to run(installed missing perl mods) my other error was I had no pager number in my contact. Once I added that in, i was then able to test and it wasn't working because of spaces in service name. I then tried without a space and it worked fine and I knew the issue was then with the code and services with spaces in them.

So now my last question is, anyway I can grab the number from the iSMS configuration for users and copy that to the pager variable?
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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: iSMS acknowledge alerts

Post by slansing »

Hmm, odd, I'm going to try to do this all over again some day when I have more time. Or more documentation is created, whichever comes first :)
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: iSMS acknowledge alerts

Post by BanditBBS »

slansing wrote:Hmm, odd, I'm going to try to do this all over again some day when I have more time. Or more documentation is created, whichever comes first :)
Well, I have attached my version of instructions(listing credit to original author of course). really not many changes except listing out the pre-reqs and including the script in the doc with my modifications.

I just installed on a second NagiosXI server and second iSMS appliance. The XI server is a manual install bare minimum RHEL install. I wrote the instructions as I performed the install to make sure I didn't miss anything.
You do not have the required permissions to view the files attached to this post.
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
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: iSMS acknowledge alerts

Post by BanditBBS »

slansing wrote: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.
I was getting some odd items in my httpd error log during my second install. It was with the test data I was using. If the information is not configured in your Nagios install, then you will receive some of those types of errors.
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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: iSMS acknowledge alerts

Post by slansing »

Looks good, I will test this shortly.
Locked