Nagios

用於讀取 RMON 文件的 Nagios 外掛

  • December 9, 2015

我可以知道 Nagios 是否能夠從文件中讀取和顯示.rmon資訊.pmon

樣品:

.rmon

Time Stamp,RX Octs,TX Octs,RX Pkts,TX Pkts,RX Drop Events,Status,RX Undersize Pkts,Status,RX Fragments,Status,RX 64Octs,TX 64Octs,RX 65 to 127Octs,TX 65 to 127Octs,RX 128 to 255Octs,TX 128 to 255Octs,RX 256 to 511Octs,TX 256 to 511Octs,RX 512 to 1023Octs,TX 512 to 1023Octs,RX 1024 to 1518Octs,TX 1024 to 1518Octs,RX CRC Alignment Errors,Status,RX Oversize Pkts,Status,TX Oversize Pkts,RX Jabbers,RX Multicast Pkts,TX Multicast Pkts,RX Broadcast Pkts,TX Broadcast Pkts,TX Collisions,Status,RX Unknown TPID,RX Unknown VID,RX MAC Limit,RX Filter Discard,RX QoS Discard,TX Queue0 Discard,TX Queue1 Discard,TX Queue2 Discard,TX Queue3 Discard,TX Queue4 Discard,TX Queue5 Discard,TX Queue6 Discard,TX Queue7 Discard,Record Status
00:15,69586578,421339463,525456,1172251,0,NORMAL,0,NORMAL,0,NORMAL,54916,153676,306346,354260,142676,60877,15165,87807,6265,515626,88,5,0,NORMAL,0,NORMAL,0,0,0,1798,0,14,0,NORMAL,0,0,0,0,0,0,0,0,0,0,0,0,0,MAINT
00:30,54931226,290982247,425662,873843,0,NORMAL,0,NORMAL,0,NORMAL,49302,135761,249862,279097,113025,44823,6999,71647,6340,342510,125,5,0,NORMAL,0,NORMAL,0,0,0,1782,0,16,0,NORMAL,0,0,0,0,0,0,0,0,0,0,0,0,0,MAINT

.pmon

Time Stamp,RF BBE,Status,RF ES,Status,RF SES,Status,RF SEP,Status,RF UAS,Status,RF OFS,Status,RX Level (MAX) [dBm],Status,RX Level (MIN) [dBm],Status,Record Status
00:15,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,-30.2,NORMAL,-31.4,NORMAL,VALID
00:30,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,-30.2,NORMAL,-30.7,NORMAL,VALID
00:45,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,0,NORMAL,-30.3,NORMAL,-31.2,NORMAL,VALID

更新

我正在考慮使用 NRPE 執行一個 bash 腳本,該腳本從文件中提取或解析資訊。然後在監控伺服器上顯示資訊。有沒有辦法以圖形格式顯示資訊?

您需要編寫腳本來檢查這些文件。在該腳本中,您需要輸出要繪製為性能數據的值。我建議您閱讀外掛開髮指南https://nagios-plugins.org/doc/guidelines.html

您可以使用 NRPE 或通過 SSH 使用 check_by_ssh 外掛或 check_by_ssh_master 外掛https://exchange.nagios.org/directory/Plugins/%2A-Remote-Check-Tunneling/check_by_ssh_master/details執行檢查。

要查看圖表,您需要 pnp4nagios https://docs.pnp4nagios.org/

引用自:https://unix.stackexchange.com/questions/247506