Nagios: Error: Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update!

Автор: | 14/07/2015
 

nagios_logoПри отправке уведомления – Nagios сообщает об ошибке:

Error: Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update!

The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.

An error occurred while attempting to commit your command for processing

nagios_install_centos_7_4

Проверяем права:

# ls -l  /usr/local/nagios/var/rw/nagios.cmd
prw-rw---- 1 nagios nagios 0 Jul  3 09:14 /usr/local/nagios/var/rw/nagios.cmd

Добавляем пользователя nginx в группу nagios:

# usermod -a -G nagios nginx

Проверяем:

# grep nagios /etc/group
nagios:x:994:apache,nginx,nagios

Меняем владельца каталога:

# chown nginx:nginx /usr/local/nagios/var/rw/
# chown nginx:nginx /usr/local/nagios/var/rw/nagios.cmd

Перезапускаем Nagios:

# service nagios restart
Restarting nagios (via systemctl):                         [  OK  ]

Пробуем:

nagios_install_centos_7_5