Page 1 of 1

Multitech Component Questions

Posted: Wed May 07, 2014 1:17 pm
by BanditBBS
Ok, I have two interesting questions regarding the Multitech Component. This is in prod running 2.8c

1.) I know sms are being sent when there is an actual alert for a real problem, but when selecting "Send Test Notifications" I am only getting the email now. I know it used to send SMS as well when hitting that button...didn't it? Going to the SMS tab and selecting the one check box and hitting update does send a test sms still. I may be completely dumb here and remembering wrong.

2.) While looking at my modem I saw a couple...let's say...colorful replies to sms messages. is there an easy way to search for phone numbers entered into the user's accounts so I can correct the typo/remove the #?

Re: Multitech Component Questions

Posted: Wed May 07, 2014 1:32 pm
by tmcdonald
Not sure about the first issue (somewhat sidetracked at the moment) but for the second you could run something like:

Code: Select all

SELECT contact_name,alias,pager FROM tbl_contact;
in the nagiosql db, then throw in a WHERE clause on the alias or whatever you want to search by. Bearing in mind of course that this will only search contacts, so if a user has no contact you'll miss out.

Re: Multitech Component Questions

Posted: Wed May 07, 2014 2:18 pm
by BanditBBS
Yeah, that isn't going to work for me. That table looks like the same data written to contacts.cfg file which doesn't have the cell phone numbers in it. They are only associated with the NagiosXI users, not the core contacts. They are added using the Multitech SMS component. I'm trying to figure out which database and table that is store in,m but not having much luck.

Re: Multitech Component Questions

Posted: Wed May 07, 2014 2:48 pm
by tmcdonald

Code: Select all

yum install -y most
psql nagiosxi nagiosxi
\o /tmp/psql.out
select * from xi_usermeta;
\q
most /tmp/psql.out
It's not pretty, but the data is there. One of the columns is a variable-length key/value disgusting mess which is not queryable via SQL. I was able to grep that output file for my own phone number and it worked.

Re: Multitech Component Questions

Posted: Wed May 07, 2014 2:54 pm
by BanditBBS
tmcdonald wrote:

Code: Select all

yum install -y most
psql nagiosxi nagiosxi
\o /tmp/psql.out
select * from xi_usermeta;
\q
most /tmp/psql.out
It's not pretty, but the data is there. One of the columns is a variable-length key/value disgusting mess which is not queryable via SQL. I was able to grep that output file for my own phone number and it worked.
So Trevor, what you are saying is I need to put in a feature request? 8-)

Go ahead and close this up, I'll put in a request and use this method for now(maybe).

edit: http://tracker.nagios.com/view.php?id=536

Re: Multitech Component Questions

Posted: Wed May 07, 2014 3:01 pm
by tmcdonald
BanditBBS wrote:So Trevor, what you are saying is I need to put in a feature request?
That or brush up on your perl :D