Centos 6.5 監控路由器、思科交換器Nagios (三)

來源:互聯網
上載者:User

標籤:snmp   use   輸入   packet   分享圖片   如何使用   script   size   bytes   

監控路由器、思科交換器


因為在交換器、路由器無法安裝監控用戶端,所以要用到snmp外掛程式

查看


# vi /usr/local/nagios/libexec/下有沒有check_snmp外掛程式,沒有則需要安裝。


一、安裝snmp服務
#yum install -y net-snmp net-snmp-devel net-snmp-perl net-snmp-utils mrtg

安裝snmp後要重新編譯安裝nagios外掛程式nagios-plugins-2.0才會在

/usr/local/nagios/libexec/下產生 check_snmp外掛程式



思科交換器:

系統測試:
check_snmp命令提供了詳細的使用說明,只需要在Linux命令列輸入 check_snmp –help即可查看協助資訊,這其中包括每一項參數的使用等。

這裡以檢測Cisco交換器的系統為例,示範如何使用check_snmp。交換器為Cisco 4500系列,系統描述的OID為.1.3.6.1.2.1.1.1.0

[[email protected] libexec]# ./check_snmp -H 10.241.10.1 -o .1.3.6.1.2.1.1.1.0 -C public
SNMP OK – “Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERV | K9-M), Version 12.2(53)SG2, RELEASE SOFTWARE (fc1)

建議用於Nagios監控的OID:
系統記憶體使用量(5分鐘內)1.3.6.1.4.1.9.9.48.1.1.1.5.1
系統可用記憶體(5分鐘內)1.3.6.1.4.1.9.9.48.1.1.1.6.1
CPU使用率(5分鐘內)1.3.6.1.4.1.9.2.1.58.0
硬體狀態1.3.6.1.4.1.9.9.13


rosteros:

在RouterOS中啟用SNMP:

[admin @ MikroTik] / snmp> print        啟用:不       聯絡:        位置:        發動機ID:        陷阱社區:(不明)       陷阱版本:1[admin @ MikroTik] / snmp> set enabled yes
物件識別碼(OID)

[admin @ MikroTik] / interface> print oid標誌:D  - 動態,X  - 禁用,R  - 運行,S  - 奴隸  0 R name = .1.3.6.1.2.1.2.2.1.2.1 mtu = .1.3.6.1.2.1.2.2.1.4.1        mac-address = .1.3.6.1.2.1.2.2.1.6.1 admin-status = .1.3.6.1.2.1.2.2.1.7.1        操作狀態= .1.3.6.1.2.1.2.2.1.8.1 bytes-in = .1.3.6.1.2.1.2.2.1.10.1        packet-in = .1.3.6.1.2.1.2.2.1.11.1 discards-in = .1.3.6.1.2.1.2.2.1.13.1        errors-in = .1.3.6.1.2.1.2.2.1.14.1 bytes-out = .1.3.6.1.2.1.2.2.1.16.1        packets-out = .1.3.6.1.2.1.2.2.1.17.1 discard-out = .1.3.6.1.2.1.2.2.1.19.1        錯誤逾時= .1.3.6.1.2.1.2.2.1.20.1

上面是oid是介面流量這些的

下面是cpu和men的oid




設定檔:

define service{        use                     generic-service ; Inherit values from a template        host_name               routeros-xxxxx        service_description     cpu        check_command           check_snmp!-C public -o .1.3.6.1.2.1.25.3.3.1.2.1 -w 30 -c 50        }



轉載參考:

https://wiki.mikrotik.com/wiki/Manual:SNMP

http://www.net130.com/CMS/Pub/Tech/tech_zh/2011_07_13_89499.htm


















Centos 6.5 監控路由器、思科交換器Nagios (三)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.