Icinga Web, Could not send command. Check if your webserver’s user has correct permissions for writing to the command pipe.

If you are getting this error when trying to perform actions on services or hosts in Icinga Web, most forum posts point to the configuration being correct, etc.

Firstly make sure that the command pipe referenced in access.xml points to a valid place, and has icinga-cmd:icinga ownership

vim /usr/local/icinga-web/app/modules/Api/config/access.xml
<!-- allowed to be written to -->
      <resource name="icinga_pipe">/var/spool/icinga/cmd/icinga.cmd</resource>
ls -l /var/spool/icinga/cmd/

Note: This example is from CentOS, your path(s) may vary

Then, which is much more likely the reason it does not work, is make sure you have not got SELinux preventing Apache from executing commands through the command pipe

Easiest way to test this is to temporarily change SELinux to permissive mode and try the action in Icinga Web again

setenforce Permissive

Note: Leaving SELinux in permissive mode is not recommended, please add a rule as necessary

Add comment