Rootop 服务器运维与web架构

Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!

| 暂无评论

外部命令文件无法stat()。
外部文件不存在,或Nagios未运行、Nagios不支持外部命令。
提交命令时出错

在服务中启用服务通知 Enable notifications for this service 提交的时候报错。
Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for processing.

根据错误提示到/usr/local/nagios/var/rw下发现没有nagios.cmd文件。不知道为啥···

解决办法:
[root@localhost ~]# cd /usr/local/nagios/var/rw
[root@localhost rw]# mkfifo nagios.cmd
[root@localhost rw]# chmod o+w nagios.cmd
[root@localhost rw]# chmod g+w nagios.cmd
[root@localhost rw]# ll nagios.cmd
prw-rw—- 1 nagios nagios 0 May 9 09:08 nagios.cmd
[root@localhost ~]# service nagios restart

FIFO是一种特殊的文件类型,它允许独立的进程通讯.
一个进程打开FIFO文件进行写操作,而另一个进程对之进行读操作, 然后数据便可以如同在shell或者其它地方常见的的匿名管道一样流线执行。

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/2561.html

作者:Venus

服务器运维与性能优化

发表回复