资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

nagios安装飞信-创新互联

一、安装所需要的软件

成都网站建设哪家好,找创新互联建站!专注于网页设计、重庆网站建设公司、微信开发、微信小程序开发、集团成都定制网站等服务项目。核心团队均拥有互联网行业多年经验,服务众多知名企业客户;涵盖的客户类型包括:成都墙体彩绘等众多领域,积累了大量丰富的经验,同时也获得了客户的一致赞许!

总下载地址:http://bbs.it-adv.net/viewthread.php?tid=1081&extra=page%3D1

wget http://www.it-adv.net/fetion/linuxso_20101113.rar

//下面的这个连接是下载飞信的可执行文件fetion,要注册回复后才能看到

http://bbs.it-adv.net/p_w_upload.php?aid=43&k=954fb0d183808bfb706d8c4a35308874&t=1335168710

//下面的这个连接是下载rar的解压缩软件文件的软件

wget http://www.rarlab.com/rar/rarlinux-3.9.2.tar.gz

二、解压下载的软件

1,安装rar的解压缩软件

tar zxvf rarlinux-3.9.2.tar.gz

cd rar

make && make install

make时如果报以下

rar: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

解决方法:

[root@localhost download]# yum install libstdc++.so.6

2、创建fetion目录

mkdir /usr/local/fetion

rar x linuxso_20101113.rar

cp ./lib* /usr/local/fetion

把下载的fetion执行程序拷贝过去到fetion目录中,并修改fetion目录属主和属组为nagios,增加执行权限

3、增加飞信所需的动态链接库

vi /etc/ld.so.conf

/usr/local/fetion

4、这一步最关键,否则系统识别不到

ldconfig  --更新/usr/local/fetion中的库文件,能够被系统识别

5、手动执行fetion,看是否报错:

/usr/local/fetion/fetion

 ************************ IMPORTANT STATEMENT ************************

 **                                 **

 **  PLEASE DON'T USE THIS SOFTWARE TO SEND JUNK SHORT MESSAGES.  **

 **  OTHERWISE PLEASE BEAR YOUR OWN CONSEQUENCES.          **

 **                                 **

 **                 Version:[20101205002-linux]    **

 *********************************************************************

 This program is the console version of China Fetion!

 It's free for personal user.

 This project website: http://www.it-adv.net/

AUTHOR:KelvinH MSN/EMAIL:shichangguo@msn.com

Usage:

  --mobile=[mobile]

  --sid=[sid]

  --pwd=[pwd]

  --config=[config file] *format:index mobile password

  --index=[index no in config file,refer to sample.conf]

  --debug  *debug mode on

  --hide  *login fetion in hidden state

  --to=[mobile/sid]

  --command-path=[command file path]

  --robotmode

  --daemon(linux only)

  --proxy-ip(http proxy ip)

  --proxy-port(http proxy port)

  --msg-gb=[gb2312/gbk message]

  --msg-utf8=[utf8 message]

  --msg-type=[0/1/2 sms longsms smartmsg]

  --file-gb=[gb2312/gbk file]

  --file-utf8=[utf8 file]

  --query-cmcc-no

  --auto-retry

  --exit-on-verifycode

  --t3key=[http://www.tui3.com/page/smssend/]

6】测试

root># /usr/local/fetion/fetion --mobile=1371xx --pwd=xx --to=1371xx --msg-utf8="阿萨"

SIP-C/4.0 280 Send SMS OK

T: sip:203294876@fetion.com.cn;p=3044

I: 2

Q: 1 M

L: 116

D: Wed, 12 Dec 2012 03:41:17 GMT

XI: 8EB4A6172FA8AD75614FB3CC323AD8F0

--其中pwd为该手机的飞信密码,并不是139密码;如果出现send sms ok的话,就说明已经发生成功了,一般第一次发生的时候,会在fetion目录生成该手机的jpg

7】修改commands.cfg

define command {

    command_name   notify-service-by-fetion

    command_line   /usr/local/fetion/fetion --mobile=1371xx --pwd=xx --msg-utf8="***Nagios***\nNotification Type: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n$SERVICEOUTPUT$ " --to=1371xx

}

define command {

    command_name   notify-host-by-fetion

    command_line   /usr/local/fetion/fetion --mobile=1371xx --pwd=xx --msg-utf8="***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $LONGDATETIME$\n " --to=1371xx

}

--其中to后面可以是contacts.cfg里面的联系人

信息格式可以随便修改,也可以这样写

define command{

 command_name   notify-host-by-fetion

 command_line   /usr/local/fetion/fetion --mobile=1371x --pwd=xx --msg-utf8="***Nagios***\nNotification Type: $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$"  --to=1371xx

 }

# 'notify-service-by-fetion' command definition

define command{

 command_name   notify-service-by-fetion

 command_line   /usr/local/fetion/fetion --mobile=1371 --pwd=xx --msg-utf8="***Nagios***\nNotification Type: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$"  --to=xx

 }

8】修改contacts.cfg,增加pager

define contact {

   contact_name            nagiosadmin

   alias                nagios administrator

   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-fetion,notify-service-by-email

   host_notification_commands     notify-host-by-fetion,notify-service-by-email

#    email              1371@139.com

    pager  1371xx

9】重启nagios服务

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页题目:nagios安装飞信-创新互联
文章分享:http://cdkjz.cn/article/dgeiog.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220