用于读取 RMON 文件的 Nagios 插件

用于读取 RMON 文件的 Nagios 插件

我可以知道 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 脚本,从文件中提取或解析信息。然后在监控服务器上显示信息。有没有办法以图形格式显示信息?

答案1

您需要编写脚本来检查这些文件。在该脚本中,您需要输出要绘制为性能数据的值。我建议你阅读插件开发指南https://nagios-plugins.org/doc/guidelines.html

您可以使用 NRPE 执行检查,也可以使用 check_by_ssh 插件或 check_by_ssh_master 插件通过 SSH 执行检查https://exchange.nagios.org/directory/Plugins/%2A-Remote-Check-Tunneling/check_by_ssh_master/details

要查看图表,您需要 pnp4nagioshttps://docs.pnp4nagios.org/

相关内容