nagios監控之飛信報警

2021-09-01 04:56:59 字數 2733 閱讀 6633

1、安裝解壓rar格式的解壓軟體

[root@web1 tmp]# wget 

[root@web1 tmp]# tar zxvf rarlinux-3.8.0.tar.gz

[root@web1 tmp]# cd rar

[root@web1 rar]# make install

[root@web1 rar]# cd ..

unrar x **.rar 想要解壓的時候,可以用次命令

[root@web1 tmp]# wget   

[root@web1 tmp]# unrar x linuxso_20101113.rar  

[root@web1 tmp]# cp lib*so* /usr/lib  

[root@web1 ~]# echo "/usr/lib" >

> /etc/ld.so.conf  

[root@web1 tmp]# ldconfig  

[root@web1 tmp]# cp fetion /usr/local/ 把飛信複製到/usr/local/裡  

[root@web1 local]# chmod 777 fetion   

[root@web1 local]# chown nagios:nagios fetion  

[root@web1 local]# ./fetion --mobile=152******** --pwd=*** --to=152********--msg-utf8=test

就能發簡訊了,現在還有個問題是最新的飛信,必須輸入圖形的驗證碼,驗證碼在fetion的安裝目錄下,一般名位手機號的jpg如,152********.jpg,檢視並輸入就能在linux裡登陸飛信。

4、配置飛信報警引數

在command.cfg裡增加以下內容:

# 'notify-host-by-fei' command definition   

define command   

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

define command   

5、在聯絡人裡增加報警手機號與飛信報**式

在contacts.cfg裡配置

service_notification_commands           notify-service-by-email,notify-service-by-fei  

host_notification_commands              notify-host-by-email,notify-host-by-fei  

增加command.cfg裡的飛信報警命令notify-service-by-fei,與notify-host-by-fei

pager

152********

增加報警手機號

現在nagios的飛信報警就已經完成,檢視日誌

能發現有飛信報警,手機也接收到了報警,(如果想要給其他人傳送,一定要對方是你的好友,否則傳送不了報警簡訊)如果您還有疑問,請找我,我會幫助您解決!

本文出自 「吟—技術交流」 部落格,請務必保留此出處

Nagios飛信結合

在測試完成 linux命令列下可以傳送飛信之後就可以將飛信與nagios結合,結合的步驟如下 1 飛信命令定義 2 聯絡人模組定義 3 新增聯絡人 1.定義命令 在 usr local nagios etc objects commands.cfg中新增以下命令定義 define command d...

Nagios之飛信與email配置

nagios 之飛信與 email 配置 首先感謝 deidara php程式 1.php 環境支援 cp var www html sms ls var www html sms class.curl.php class.fetion.php class.sipc.php send.php 更改 ...

nagios安裝配置報警監控搭建

1.nagios 簡介 是乙個開源軟體,可以監控網路裝置網路流量 linux windows主機狀態,甚至可以監控印表機 它可以執行在linux上或windows上 基於瀏覽器的web介面方便運維人員檢視監控專案的狀態 支援web介面配置 管理操作 支援簡訊 郵件通知 可以自定義指令碼實現自定義化監...