Nagios-无法打开命令文件/usr/local/nagios/var/rw/nagios.cmd"进行更新 [英] Nagios - Could not open command file /usr/local/nagios/var/rw/nagios.cmd’ for update

查看:88
本文介绍了Nagios-无法打开命令文件/usr/local/nagios/var/rw/nagios.cmd"进行更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Nagios Web界面禁用对服务的主动检查,但我无法做到. Nagios实例在Centos 5发行版上运行

I'm trying to disable active check for a service through Nagios web interface, but I cant make it. The Nagios instance is running on a Centos 5 distribution

每次我尝试停止该服务时,都会收到以下消息: 无法打开命令文件"/usr/local/nagios/var/rw/nagios.cmd"进行更新!

Each time I try to stop the service I get this message : Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update!

尽管我尝试了一些在网上找到的建议:

Although I tried several proposals found on the web :

usermod -a -G nagios apache
chmod 666 /usr/local/nagios/var/rw/nagios.cmd
chown nagios.nagcmd /usr/local/nagios/var/rw
chmod u+rwx /usr/local/nagios/var/rw
chmod g+rwx /usr/local/nagios/var/rw  
chmod g+s /usr/local/nagios/var/rw 

每次之后,每次重新启动nagios服务.

Each time rebooting nagios service afterwards of course.

感谢您的帮助! 干杯

推荐答案

此命令错误:

usermod -a -G nagios apache

usermod -a -G nagios apache

rw目录和nagios.cmd文件上的组权限是nagcmd,而不是nagios.您需要这个,而不是:

The group permissions on your rw directory and nagios.cmd file are nagcmd, not nagios. You need this, instead:

usermod -a -G nagcmd apache

usermod -a -G nagcmd apache

这是对我有用的-更具体地说,在Ubuntu上,它是:

This is what worked for me - or more specifically, on Ubuntu, it's:

usermod -a -G nagios www-data

usermod -a -G nagios www-data

这篇关于Nagios-无法打开命令文件/usr/local/nagios/var/rw/nagios.cmd"进行更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆