Emerge-AV emul-linux-x86-baselibs
Recently, zabbix has been deployed in the company to monitor all the servers and routers in the company in real time. The results exceed expectations and are greatly improved.
Network management efficiency.
However, it seems that there are not many users using zabbix in China. There is only one article about using fetion as the alarm media, which is basically not clear.
After research and arrangement, the final configuration of Apsara as the alarm medium is completed.
This document records the entire configuration process for memo and sharing.
Please send an email to master@crob.net
Or QQ: 2850178.
Please indicate the source of the Post. Thank you.
1. Environment Description: (Gentoo Linux environment)
# Uname-
Linux Crob 2.6.34-Gentoo
#1 SMP mon May 31 15:45:25 CST 2010 x86_64 Intel (r) core (TM) 2 Duo CPU
E7500 @ 2.93 GHz genuineintel GNU/Linux
# Emerge-PV zabbix
These are the packages that wocould be merged, in order:
Calculating dependencies... done!
[Ebuild R] net-analyzer/zabbix-1.8.2
Use = "Agent curl frontend jabber MySQL openipmi Proxy Server SNMP-IPv6
-LDAP-Oracle-S-sqlite3 "0 KB
2. Download the flying mail robot
Http://www.it-adv.net/
# Wget
Http://www.it-adv.net/fetion/downng/fetion20091117-linux.tar.gz
3. Install and test the Flying Robot
Install
# Tar-zxvf
Fetion20091117-linux.tar.gz-C/usr/local/
Test
#/Usr/local/FX/fetion
-- Mobile = 138176 XXXXX -- Pwd = XXXXX -- To = 138176 XXXXX -- msg-utf8 = "This Is A Test message"
Check whether the phone receives the message
4. Create a sendsms. Sh text message sending script
# Vim/usr/bin/sendsms. Sh
The file content is as follows:
#! /Bin/sh
# Send SMS by fetion
# Write by Crob
# $1, $2, $3 mean recipient,
Subject and message
/Usr/local/FX/fetion -- Mobile = 138176 XXXXX -- Pwd = risghdhdn1 -- To = $1
-- Msg-utf8 = "$2, $3"
Save the test script:
# Chmod + x/usr/bin/sendsms. Sh
#/Usr/bin/sendsms. Sh
138176 XXXXX Hello World
Check whether the phone receives the message
5. added the media type of zabbix.
Log on to zabbix, go to "Administration"> "media types", and click "CREATE" in the upper right corner.
Media type ".
Enter "fetion" or another name for description, "script" for type, and "sendsms. Sh" for script ".
Click "save" to save the configuration.
# Vim
/Etc/zabbix/zabbix_server.conf
Find the alertscriptspath parameter and change it to alertscriptspath =/usr/bin/
Restart zabbix-Server
6. added the actions configuration for zabbix.
Log on to zabbix, go to "configation"> "actions", and click "create actions" in the upper right corner ".
Enter "name". All others are default.
Click "new" under "action operations" on the right and select "send" for "operation type ".
Message "," send message to "select one or more user groups to send messages," Send only
To "select the fetion we added earlier.
Click "save" to save the configuration.
7. zabbix User Configuration
Log on to zabbix and go to "adimistration">
"Users": select a user in the Members column of the group in which the message is to be sent, for example, admin user.
Click "add" at the bottom of the "Media" section of the User Information Modification interface.
Select "fetion" for "type", send to enter the recipient's mobile phone number, modify other parameters as needed, and click "add.
Click "save" to save the configuration.
Now that the configuration is complete, an alarm is triggered to test whether the phone receives a message.