linux – NRPE:无法读取输出

linux – NRPE:无法读取输出,第1张

概述我尝试监控 MySQL数据库: [[email protected] ~]# su nagios -c /usr/lib/nagios/plugins/check_mysql Uptime: 18014 Threads: 1 Questions: 6 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per seco 我尝试监控 MySQL数据库:

[[email protected] ~]# su nagios -c /usr/lib/nagios/plugins/check_MysqL
Uptime: 18014 Threads: 1 Questions: 6 Slow querIEs: 0 Opens: 12 Flush tables: 1 Open tables: 6 QuerIEs per second avg: 0.000

但我有意想不到的错误:

[[email protected] ~]$/usr/lib/nagios/plugins/check_nrpe -H monitored.com -c check_MysqL
NRPE: Unable to read output

怎么了?

解决方法 调试正在执行的命令没有返回任何有效输出的一个好方法是使用strace.例如,我在通过NRPE运行check_linux_raID命令时遇到问题.

运行strace -f -p< nrpe pID>,然后从运行nagios的系统手动执行命令(例如/usr/lib64 / nagios / plugins / check_nrpe -H remotename -c commandname -a arg1 arg2 …).

扫描strace的输出以查找错误,例如拒绝权限或可能发生的其他类似错误.例如,在我的情况下,selinux在从远程计算机运行时拒绝对文件的许可,即使该用户具有对该文件的本地访问权限.

总结

以上是内存溢出为你收集整理的linux – NRPE:无法读取输出全部内容,希望文章能够帮你解决linux – NRPE:无法读取输出所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1039469.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存