Free SMS prompt configuration in Nagios Feixin linux

Source: Internet
Author: User

Nagios fetion first needs to activate China Mobile's fetion business. Currently, Apsara SMS is free of charge. You need to add the mobile phone that receives the text message and the mobile phone that sends the mail as a friend. The following is a free text message notification configuration for Nagios Feixin linux.

Download the linux client program of Apsara. After the package is unwrapped, there is only one file sms. Good. This is the Program for sending text messages from Apsara. Currently, Feixin cannot be used. Because it requires support from the glibc library of libace.

1. Download Nagios fetion program:
1. Official website of Apsara: http://www.it-adv.net/
2. Download the official Feixin command: sms
Http://www.it-adv.net/fetion/fetion_linux_20080402.tar.gz
3. Download the official lib library of Apsara Stack:
32-bit official Library: http://www.it-adv.net/fetion/library32.rar
64-bit official lib Library: http://www.it-adv.net/fetion/library64_linux.tar.gz

2. Nagios fetion program test:

1. Test the Apsara command:
# Wgethttp: // www.it-adv.net/fetion/fetion_linux_20080402.tar.gz
#Tarxvfzfetion_linux_20080402.tar.gz
# Cpsms/usr/bin
# Sms-h
Sms-fmobile-ppwd-tmobile1,...-mmessage-amessage-d
Sms-fmobile-ppwd-tmobile1,...-ifile_name [utf8]-ainvite_message-d1
-F: Fetionmobileaccount (onlysupportsmobilephoneNo .)
-P: Accountpassword
-T: destinationtransferelist
-M: Message
-I: Filename (onlysupportsutf8)
-A: Autosendinviteusinginvite_message.
-D: Debugon.
If the lib library is not installed, the libACE. so.5.4.7 package is missing.

Iii. solution to the lack of lib Library:

Note: The libACE. so.5.4.7 library is required for downloading centOS5. Do not install the ACE package on your own. It is very troublesome. The official version of liunx has been downloaded:
1. Check the missing lib file first.
[Root @ nagioslibexec] # lddsms
Linux-gate.so.1 => (0x00b00000)
LibACE. so.5.4.7 => notfound
LibACE_SSL.so.5.4.7 => notfound
Libssl. so.0.9.8 => notfound
Libstdc ++. so.6 =>/usr/lib/libstdc ++. so.6 (0x02a05000)
Libm. so.6 =>/lib/libm. so.6 (0x00cd4000)
Libgcc_s.so.1 =>/lib/libgcc_s.so.1 (0x029f7000)
Libc. so.6 =>/lib/libc. so.6 (0x00b92000)
/Lib/ld-linux.so.2 (0x001c3000)
2. Download the lib Library:
32-bit official Library: http://www.it-adv.net/fetion/library32.rar
64-bit official lib Library: http://www.it-adv.net/fetion/library64_linux.tar.gz
3. Install the lib Library
[Root @ nagioslibrary32] # ls
LibACE. so.5.4.7libACE _ SSL. so.5.4.7libcrypto. so.0.9.8libssl. so.0.9.8
[Root @ nagioslibrary32] # cp *. */lib/
[Root @ nagioslibrary32] # cp *. */usr/lib/

4. Test sms:
[Root @ nagioslibexec] #./sms
* *********************** IMPORTANTSTATEMENT *************** *********
****
** PLEASEDON 'tusethissoftwaretosendjunk1_messages .**
** OTHERWISEPLEASEBEARYOUROWNCONSEQUENCES .**
****
** [Version: 2008-4-2] **
**************************************** *****************************
Thisprogramisforsendinginclumessagesviacmccfetion!
[Url = http://www.fetion.com.cn/?http://www.fetion.com.cn/
AUTHOR: KelvinHanMSN/EMAIL: shichangguo@msn.com2008/3/8

Usage:
Sms-fmobile-ppwd-tmobile1,...-mmessage-amessage-d
Sms-fmobile-ppwd-tmobile1,...-ifile_name [utf8]-ainvite_message-d1
-F: Fetionmobileaccount (onlysupportsmobilephoneNo .)
-P: Accountpassword
-T: destinationtransferelist
-M: Message
-I: Filename (onlysupportsutf8)
-A: Autosendinviteusinginvite_message.
-D: Debugon.

Iv. Nagios Feixin test:

1. You need to register a mobile phone number that can use Apsara. During the test, you can send it to yourself for testing.

2. Send a mail to another mobile phone. You need to bind your mobile phone to a friend.

3. The Apsara environment has been solved. send a text message and test it.
136933XXXXX is the registered mobile phone number of the mail
136833 XXXXX and 201733xxxxx are the mobile phone numbers used to receive SMS messages.
[Root @ nagioslibexec] #./sms-f136933XXXXX-ppassword-t136833XXXXX-mhello, thisistest
You can also send messages in a single file, such as message.txt.
./Sms-f136933XXXXX-ppassword-t136833XXXXX,136733XXXXX-imessage.txt

If the phone number that receives the text message is in your friend list, the message is sent successfully.
If it is not in the friend list, the message cannot be sent successfully. If you want the program to invite them to join, use the-a parameter.
Sms-f136933XXXXX-ppassword-t136833XXXXX, 136733XXXXX-m hello, fetion-aUBUNTU

In this way, the recipient will receive a confirmation text message sent by mobile.

5. Nagios fetion Configuration:

1. Configure commands. cfg with the nagios Command:
More/usr/local/nagios/etc/commands. cfg
Definecommand {
Command_namenotify-service-by-sms
Command_line/usr/bin/sms-f13901111111-p562128-t $ CONTACTPAGER $-m "$ HOSTNAME $ SERVICEDESC $ is $ SERVICESTATE $
On $ TIME $ resultis $ SERVICEOUTPUT $ "$ CONTACTPAGER $
}

2. Configure contacts. cfg for Nagios sending:
[Root @ nagios ~] # More/usr/local/nagios/etc/contacts. cfg
Definecontact {
Contact_namesa
Aliassystemadmin
Host_icationication_period24x7
Service_icationication_period24x7
Host_icationication_optionsd, r,
Service_icationication_optionsc, w, r
Service_notification_commandsnotify-service-by-email, choose y-service-by-sms
# Service_notification_commandsnotify-service-by-email
Host_notification_commandsnotify-host-by-email
# Email [email] 1234@sina.com [/email]
Pager158010775111
}
[Root @ nagios ~] #

Vi. Remarks:

[Size = 5] [color = Orange] add content: the new lib library is now available in both the 32-bit and 64-bit operating systems after testing !!
Test System: centos5.2
Wgethttp: // www.it-adv.net/fetion/lib_lin_32.tar.gz#/color#/size]

  1. Implementation of the Nagios network management module in Linux
  2. Open-Source Monitoring Project Nagios derivative new project ICINGA is more community-oriented
  3. O & M monitoring Nagios serialization 3: deploying and configuring the Nagios Service
  4. O & M monitoring serialization: full solution to nagios, an open-source monitoring tool
  5. O & M monitoring Nagios serialization 2: deploying an apache server

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.