CentOS 6.5 x64安装nagios fetion报警
一.由于运维工作使用的操作系统多是CentOS和ubuntu,两个系统上面安装的飞信依赖包会有所不同,现在我就安装一下CentOS的fetion
二.安装fetion的一些依赖包 由于fetion需要的是32位系统的包,所以安装的软件名称后面加上.i686(ubuntu软件名称后面是:i386)
[root@localhost ~]#yum install glibc.i686 krb5-libs.i686 libstdc++.i686 zlib.i686
二.下载fetion程序文件
[root@localhost ~]wget http://www.it-adv.net/fetion/downng/fetion20091117-linux.tar.gz
[root@localhost ~]tar zxvf fetion20091117-linux.tar.gz
[root@localhost ~]mv fx/ /usr/local/fetion
[root@localhost ~]cd /usr/local/fetion/
[root@localhost fetion]# ls
cache commands done fetion libACE-5.7.2.so libACE_SSL-5.7.2.so libcrypto.so.4 libeay32.dll libssl.so.4 logs plugins
[root@localhost fetion]#sudo vim /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/usr/local/fetion
[root@localhost fetion]#sudo ldconfig
三.由于fetion20091117-linux.tar.gz文件里面的fetion文件已经被作者更新,无法使用,所以要重官网下载fetion最新文件,文件下载网址(http://bbs.it-adv.net/viewthread.php?tid=1081&extra=page%3D1)(注意:此网址不能直接点击打开,要拷贝到浏览器里面打开)
[root@localhost ~]chmod +x fetion
[root@localhost ~]mv fetion /usr/sbin/
[root@localhost ~]cp /usr/sbin/fetion /usr/local/fetion/
四.下载更新后的库文件
[root@localhost ~]wget http://www.it-adv.net/fetion/linuxso_20101113.rar
[root@localhost ~]wget http://www.rarsoft.com/rar/rarlinux-3.6.0.tar.gz (rar的解压软件)
[root@localhost ~]tar zxvf rarlinux-3.6.0.tar.gz
[root@localhost ~]cd rar
[root@localhost rar]#make
[root@localhost rar]#cd ..
[root@localhost ~]unrar x linuxso_20101113.rar
[root@localhost ~]cp libACE* libcrypto.so.4 libssl.so.4 /usr/local/fetion/
五.安装完成之后测试,输入完验证码就可以正常发送短信
[root@localhost ~]fetion --mobile=13918016506 --pwd=Aiyou1234 --to=13918016506,13918016506 --msg-utf8="hello world"
要求输入验证码,验证码的路径在/usr/sbin路径下,由于是图片下载到本地查看
六.nagios配置配置飞信报警
Configuration contacts.cfg
define contact (
contact_name admin
alias system admin
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d, r
service_notification_options c, w, r
service_notification_commands notify-service-by-fetion
host_notification_commands notify-host-by-fetion
pager 139xxxxxxxxx
)
Configuration miscommands.cfg file
define command (
command_name notify-host-by-fetion
command_line /usr/sbin/fetion --mobile=139xxxxxxxx --pwd=xxxxxxxx --to=$CONTACTPAGER$ --msg-utf8="Host $ HOSTSTATE $ alert for $ HOSTNAME $! on '$ LONGDATETIME $'"
)
define command (
command_name notify-service-by-fetion
command_line /usr/sbin/fetion --mobile=139xxxxxxxx --pwd=xxxxxxxx --to=$CONTACTPAGER$ --msg-utf8="$ HOSTADDRESS $ $ HOSTALIAS $ / $ SERVICEDESC $ is $ SERVICESTATE $ on $ LONGDATETIME $"
)
转载于:https://blog.51cto.com/czar90/1338764
CentOS 6.5 x64安装nagios fetion报警相关推荐
- centos 5.4 x64 安装nagios 3.2.3
Nagios 安装 一 ,准备工作,最小化安装系统 系统版本 centos 5.4 http://www.verycd.com/topics/2776496/ nagios-3.2.3.tar htt ...
- Centos 6.5 x64 安装 虚拟专用网 服务器
Centos 6.5 x64 安装 虚拟专用网 服务器 http://www.mgrei.com/archives/259.html 本教程适用于Openv VPS.Xen VPS或者KVM VPS. ...
- centos5安装oracle11,CentOS 6.5 x64 安装 Oracle11g R2
一. 环境配置 操作系统: CentOS6.5-x86_64 主机名: aqgk-oracle 内存:64G 安装文件: p13390677_112040_Linux-x86-64_1of7.zip. ...
- Centos 8 stream x64安装KVM
Centos 8 stream 安装kvm 提示:本次记录介绍根据在X86机器中,安装KVM服务的过程,仅供参考 提示:安装前需确保服务器可以支持与互联网互通,在安装过程中会需要下载外网依赖 Cent ...
- 在Centos 6.4系统下安装配置fetion飞信机器人
我想飞信机器人大家并不陌生,这里我就不多说了,很多维友都用它来作为监控系统的报警,通过飞信来给运维管理员发送报警的短信,在32位的系统上安装比较简单,而在64位的系统上安装稍麻烦些,下我以CentOS ...
- CentOS安装Nagios网络监视工具
Nagios是一款开源的免费网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员, ...
- CentOS 6.5安装nagios
linux下nagios安装 系统环境:CentOS 6.5 安装包:httpd-2.2.12.tar.bz2 , pcre-8.30.tar.bz2 , php-5.4.6.tar.bz2 ...
- 编译安装LNMP Centos 6.5 x64(6.6 x64) + Nginx1.6.0 + PHP5.5.13 + Mysql5.6.19
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G) 系统版本:CentOS-6.5-x86_64-minimal.iso 安装步骤: 0.虚拟系统安装 0.1 使用VMwa ...
- postgresql linux rpm,postgresql 9.6 rpm包安装 CentOS 7.2 X64
postgresql 9.6 rpm包安装 CentOS 7.2 X64 发布时间:2020-07-07 03:55:55 来源:51CTO 阅读:4069 作者:pgmia 栏目:数据库 1.pgd ...
最新文章
- 点点看 只有想不到没有看不到
- 不愧是北大疯人院!阿里数学竞赛决赛,入围人数超过清华和南大之和!
- 剑指Offer:包含main函数的栈(借助辅助栈)
- 经典C语言程序100例之五五
- Windows最全快捷键
- Java正则表达式实现计算器_用java编写win7计算器
- when will BOL flag lv_do_reread be set
- SQL Server默认1433端口修改方法
- Django 数据导入和导出
- 时间序列的预处理之纯随机性检验
- LeetCode刷题——455. 分发饼干
- 【翻译】Species distribution modeling 2 数据准备
- 七,OpenERP 移库操作模块
- Python3.8.0中string与byte相互转换
- Python 支付宝转账到银行卡二维码制作步骤分享
- 【渝粤题库】陕西师范大学200391 初等几何研究 作业(专升本)
- 网络接口 FE GE 10GE SFP
- java 54张扑克牌_Java基础高级综合练习题扑克牌的创建
- 感光器尺寸 面积 转换 计算
- centos7安装otrs
热门文章
- ansys本地的help文件_PostgreSQL本地/远程登陆配置
- svg实现loading效果
- 浏览器可以用c语言编辑吗,如何在浏览器端运行c/c++语言编写的代码
- 树莓派桌面没有时间_树莓派日期时间不准的修正方法
- 中upload依赖包_upload-labs writeup
- html没有内容怎么爬,Url没有在网页中返回正确的html(对于我的Java爬虫)
- vpc数量上限_服务器虚拟机最大数量限制
- swift的设计原则_iPhone12 的UI设计规范如何做?
- Javascript ES6 Promise异步链式读取文件解决回调地狱
- c语言实现一个编译器生成语法树,运用JavaScript构造C语言子集的编译器