Page 1 of 1

Multitech SMS Alerting

Posted: Thu Oct 24, 2013 9:18 am
by BanditBBS
Please don't let Andy answer this, I am already fearing a 'no' reply!

Is there any way I could pass a message and phone number into XI so it can use the Multitech SMS modem I have? On a new XI server I just installed, we are handling on-call rotation completely different then I do on the other server. There is a contact "primary-sys" and it doesn't use XI alert handler. Instead, its a custom one, that connects to a mysql database, finds the current primary-sys person, grabs their information and emails the [email protected]. Instead, I'd like to change the script to send to the SMS modem and bypass email system.

Re: Multitech SMS Alerting

Posted: Thu Oct 24, 2013 9:33 am
by abrist
There must be a way to accomplish this, as this seems to be a scriptable solution. Would you still be connecting to the database for contact information?

Re: Multitech SMS Alerting

Posted: Thu Oct 24, 2013 9:37 am
by BanditBBS
abrist wrote:There must be a way to accomplish this, as this seems to be a scriptable solution. Would you still be connecting to the database for contact information?
HAHAHA, I was so nervous when I saw who replied!

Umm, yes, will be calling the same script they currently use just was hoping to change the output to script it out to the SMS instead of email.

Re: Multitech SMS Alerting

Posted: Thu Oct 24, 2013 10:24 am
by abrist
You would rather use your sms modem than emailing an sms gateway for your mobile carriers? How would you go about sending a text from the cli to the modem currently?

Re: Multitech SMS Alerting

Posted: Thu Oct 24, 2013 10:35 am
by BanditBBS
abrist wrote:You would rather use your sms modem than emailing an sms gateway for your mobile carriers? How would you go about sending a text from the cli to the modem currently?
Right now, on my Corporate XI install, I use the Multitech component and the XI alert handlers, everything is great.

On the ecommerce Nagios Core server they have custom alert handlers.
Here is a contact:

Code: Select all

define contact{
	contact_name		primary_sys_admins
	alias				System Admins On-Call
	service_notification_period	24x7
	host_notification_period	24x7
	service_notification_options	w,u,c,r
	host_notification_options	d,u,r
	service_notification_commands	notify-by-email,notify-by-epager-group
	host_notification_commands	host-notify-by-email,host-notify-by-epager,notify-by-epager-group
	email				primary_sys_admins	
	pager				primary_sys_admins
	}
Here is the command host-notify-by-epager:

Code: Select all

# 'host-notify-by-epager' command definition
define command{
	command_name	host-notify-by-epager
	command_line	/usr/local/nagios3/bin/hostpageall '$CONTACTNAME$' '$HOSTALIAS$' '$HOSTSTATE$' '$HOSTOUTPUT$' '$DATETIME$' '$NOTIFICATIONTYPE$' '$HOSTNAME$' '$HOSTSTATE$'
	}
I converted the Core server to XI. So now say there is a host with alerts set to go to the contact primary_sys_admins. The script hostpageall connects to a database where the on call information is stored. it then searches for that contact and grabs the information for the currently on call person for that group and emails to their [email protected] or whatever carrier. I'd like to modify that script to send to the SMS modem directly(good luck to me) or to pass all the variables over to the component in XI so it can then communicate the alert to the SMS modem.

OMG, I just confused myself typing all that...do you understand?

Re: Multitech SMS Alerting

Posted: Thu Oct 24, 2013 12:58 pm
by BanditBBS
using the API is actually quite easy.

Information can be found here for anyone else that ever needs to do something similar:
http://www.multitech.net/developer/prod ... -send-api/

close this up :)

Re: Multitech SMS Alerting

Posted: Thu Oct 24, 2013 1:22 pm
by slansing
Didn't even give us a chance to help much... ! Closing for now, let us know if you want to re-open it.