sms alert

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

sms alert

Post by vinothsethuram »

I would like to add sms alert along with email alert. Is there any free sms client available?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: sms alert

Post by slansing »

Generally to alert by SMS you either make use of an internal out of band SMS modem, or you send your alerts to <number>@carrier.smsaddress etc, do you know your carriers address to which you would send messages so they can relay them to your mobile devices? Please reference:

http://serverfault.com/questions/164565 ... sms-alerts
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: sms alert

Post by vinothsethuram »

I believe email to sms is applicable for linux machine:

[email protected] i.e. [email protected].

If send email to [email protected] from outlook, I am getting sms to my mobile number But if I send sms in command line ( echo “This will go” | mail -s “Hello” [email protected]), I am not receiving sms.

Do we need to have any libraries for email to sms feature?
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: sms alert

Post by vinothsethuram »

Jan 30 13:30:35 nagios sendmail[16780]: s0U4SoFQ026298: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=14:01:45, xdelay=00:00:00, mailer=esmtp, pri=1380525, relay=mymetropcs.nextamh.syniverse.com., dsn=4.0.0, stat=Deferred: Connection timed out with mymetropcs.nextamh.syniverse.com.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: sms alert

Post by tmcdonald »

Former Nagios employee
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: sms alert

Post by vinothsethuram »

Nope. Its not working. I am able to send email only within our network/domain. Not to other email ids.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: sms alert

Post by abrist »

Does your server send mail through an smtp relay?
Does you server have an fqdn?

EDIT: Also, try to declare "return" (-r) (from address):

Code: Select all

echo "This will go" | mailx -s "Hello"  -r one@address another@address
Make sure both addresses exist. The sms mail relay/gateway may be bouncing your email due to the from address being invalid (like root@localhost etc).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: sms alert

Post by vinothsethuram »

Eventhough I specify return and sender email id, I am not getting emails....

Code: Select all

-bash-4.1# hostname --fqdn
nagios.companyname.com

Code: Select all

-bash-4.1# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 nagios.companyname.com ESMTP Sendmail 8.14.4/8.14.4; Thu, 30 Jan 2014 18:16:51 -        
0500
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: sms alert

Post by sreinhardt »

As abrist mentioned, this is likely one of a few things to do with relaying. Specifically either that your local network is not allowing the nagios machine to send out directly via smtp instead of out through your mail server. Additionally, your mail server needs to be configured to allow relaying for external domains, which absolutely is not on by default. The major difference is that when your mail client(outlook) sends mail, it is sent as your user from a trusted source, whereas when nagios sends it, your server does not know if this is spam or something else malicious that is just trying to use your systems to spam other people. My feeling is that relaying to external domains is not allowed on your mail server. This would be pretty easy to test, if nagios also cannot send to gmail\hotmail\yahoo mail, anything like that but is still trying to send via your email server, it is likely being blocked by your mail server. If it does go through, we may have something else going on that we can then look at.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: sms alert

Post by vinothsethuram »

sreinhardt wrote:As abrist mentioned, this is likely one of a few things to do with relaying. Specifically either that your local network is not allowing the nagios machine to send out directly via smtp instead of out through your mail server. Additionally, your mail server needs to be configured to allow relaying for external domains, which absolutely is not on by default. The major difference is that when your mail client(outlook) sends mail, it is sent as your user from a trusted source, whereas when nagios sends it, your server does not know if this is spam or something else malicious that is just trying to use your systems to spam other people. My feeling is that relaying to external domains is not allowed on your mail server. This would be pretty easy to test, if nagios also cannot send to gmail\hotmail\yahoo mail, anything like that but is still trying to send via your email server, it is likely being blocked by your mail server. If it does go through, we may have something else going on that we can then look at.

Agreed. We configured mailer daemon to send email to external domains. It is working fine now.
Locked