1

I have enabled external commands, and they do work from the web interface.

I have enabled external command logging.

I write to the socket with this script:

$ echo "[`date +%s`] ADD_HOST_COMMENT;carroll;0;icingaadmin;comment" | sudo -u nagios tee -a /var/lib/icinga/rw/icinga.cmd
[1314390099] ADD_HOST_COMMENT;carroll;0;icingaadmin;comment
$ grep EXTERNAL /var/log/icinga/icinga.log | tail -n 1
[1314390100] EXTERNAL COMMAND: ADD_HOST_COMMENT;carroll;0;icingaadmin;comment

And I don't see new comment in the webinterface!

What's wrong?

1
  • restarted the whole server and now external commands work.... mystery.
    – Dima
    Aug 27 '11 at 16:25
0

If there was no restart (your comment isn't persistent) then I'm guessing you have the wrong host_name or have used the host's alias or are not authorized to see extended host information in the web interface.

1
  • tried both persistent and non-persistent comments. host name is correct (double checked), i can add comments through web interface and see them.
    – Dima
    Aug 27 '11 at 15:25
0

No need to restart. Did you press Ctrl+F5 several times to refresh the web interface?

3
  • yes, i have done that.
    – Dima
    Aug 27 '11 at 15:25
  • What is permission of cmd.cgi? And which group did you use when configuring icinga --with-command-group? Did you add nagios/icinga to this group?
    – quanta
    Aug 27 '11 at 16:21
  • installed from debian packages. restarted server and now it works. Strange.
    – Dima
    Aug 27 '11 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.