CentOS under Nagios alarm fetion deployment Four steps away

Source: Internet
Author: User

CentOS under Nagios alarm fetion deployment Four steps away 

Today help a group of brothers with the next Nagios on the fetion, this thing I personally feel is very practical, but for a long time did not match, today configured again, by the way the process recorded down, for everyone to learn!!!

First, install the Fetion

Cd/root/tools
wget http://ebook.elain.org/tools/fetion20101205.tar.gz

The installation step is slightly, the package has
Add the phone number to receive the alarm SMS as Fetion friend

/usr/local/fetion/fetion--mobile=137xxxxxxxx--pwd=1111111--to=138xxxxxxxx--msg-type=1--msg-utf8= "the Fetion test is OK "

Note: The first time to enter a verification code, generate a verification code, another terminal to download the picture, open the view, pay attention to case-sensitive!!!

Second, vi commands.cfg add

Define Command{
Command_name notify-host-by-fetion
Command_line/usr/local/fetion/fetion--mobile=137xxxxxxxx--pwd=1111111--to=138xxxxxxxx--msg-type=1--msg-utf8= "* * $NOTIFICATIONTYPE $ Host Alert: $HOSTNAME $ is $HOSTSTATE $ * * "
}

Define Command{
Command_name notify-service-by-fetion
Command_line/usr/local/fetion/fetion--mobile=137xxxxxxxx--pwd=1111111--to=138xxxxxxxx--msg-type=1--msg-utf8= "* * $NOTIFICATIONTYPE $\n\nservice: $SERVICEDESC $\nhost: $HOSTALIAS $\naddress: $HOSTADDRESS $\nstate: $SERVICESTATE $\n\ Ndate/time: $LONGDATETIME $\n\nadditional info:\n\n$serviceoutput$ * * "
}



Third, VI templates.cfg

Define Contact{
............
Service_notification_commands notify-service-by-fetion
Host_notification_commands notify-host-by-fetion
............
}

Iv. VI contacts.cfg

Define Contact {
Contact_Name Elain
Alias SA
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-service-by-email,service-notify-by-fetion
Host_notification_commands notify-host-by-email,host-notify-by-fetion
email [email protected]
Pager 138xxxxxxxx
}/etc/init.d/nagios Checkconfig #检查配置文件 Correctness

/etc/nit.d/nagios Reload #重新加载配置文件

Stop the service to do the test!!!

CentOS under Nagios alarm fetion deployment Four steps away

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.