Agiossms SMS alert settings

Source: Internet
Author: User
To facilitate our management, Nagios provides at least three manifestations: 1. you can view monitored objects through a browser. for example, in normal state, the monitored objects are in the status) it is filled in blue and an OK is displayed. 2. email notification: when a fault occurs, the system sends an email to the administrator or related personnel after the set retry times and detection interval are reached to report the general situation of the problem. 3. mobile phone text message, which is very useful and timely. during sleep at night, it is no longer possible to view web pages or check emails.

Nagios provides at least three methods to facilitate our management:
1. web mode, that is, viewing monitored objects through a browser. in normal state, the status is filled in blue and an OK is displayed.
2. email notification: when a fault occurs, the system sends an email to the administrator or related personnel after the set retry times and detection interval are reached to report the general situation of the problem.
3. mobile phone text messages are very useful and timely. during sleep at night, it is no longer possible to view web pages or check emails. Once a fault occurs, text messages can wake you up at any time.
Generally, these three tasks are performed simultaneously: open a browser during work hours to view the page display, open the mail program, regularly receive emails, and the mobile phone is online 24 hours a day.

 

Under normal circumstances, no server can send short messages to a mobile phone. to achieve this goal, you have to spend money to purchase the short message service (and some people use the Feixin method to achieve this goal, I personally think it is not very reliable for operating websites ). A few years ago, it was still possible to apply for a text message channel. after 2005, it seemed that the threshold had increased a lot. After your payment is successful, the SMS service provider will provide you with portals and encryption keywords. then we can write a script to send text messages. The following is a script written in perl on my server :#! /Usr/bin/perl-wuse strict; use LWP: Simple; use URI: Escape; use Digest: MD5; my ($ mobile, $ content) = @ ARGV; my $ log_control = 1; my $ key = 'ysdbyhd6t'; my $ souce_content = substr ($ mobile, 0, 8 ). substr ($ mobile,-10, 10 ). $ key; my $ md5 = Digest: MD5-> new; $ md5-> add ($ souce_content); my $ result_conent = uc ($ md5-> hexdigest ); my $ url = "http://http.asp.sh.cn/MT.do? Username = sery & Password = ([-BVG '0 & Mobile = $ mobile & Content = $ content & Keyword = $ result_conent "; my $ result = get $ url; if ($ log_control) {my $ fh; open ($ fh, '>/var/log/sms. log ') or die "can't open log: $! "; Print $ fh join ('', time, $ result, "\ n"); close $ fh;} (the above script is provided by Yujie,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.