Nagios WAP Service Achknowledgement Issue


#1

We are running Nagios 3.0.2 and have a problem trying to acknowledge services through the WAP interface. For example, I have a host with an SSH check that is in a critical state. I can acknowledge the issue in the regular web interface but not through the WAP interface. I get the following error:

Error: You’re not authorized to commit that command!

Is there a separate authorize list for the WAP? One other note, I can acknowledge host down states within the WAP.

Any help on what I might have missed would be great.


#2

The problem appears to be when you get the CARD#3 location in the statuswml.cgi. The service is not being passed on the post command, but rather the hostname is being passed as the service. If I run thecmd.cgi manually from the command line for the same host it works. statuswml.cgi appears to contain a bug.


#3

In statuswml.c I changed this line:

    printf("<go href='%s' method='post'><postfield name='host' value='%s'/><postfield name='service' value='%s'/><postfield name='com_author' value='$(name)'/><postfield name='com_data' value='$(comment)'/><postfield name='persistent' value=''/><postfield name='send_notification' value=''/><postfield name='cmd_typ' value='%d'/><postfield name='cmd_mod' value='%d'/><postfield name='content' value='wml'/></go>\n",COMMAND_CGI,url_encode(host_name),url_encode(service_desc),CMD_ACKNOWLEDGE_SVC_PROBLEM,CMDMODE_COMMIT);

to

    printf("<go href='%s' method='post'><postfield name='host' value='%s'/><postfield name='service' value='%s'/><postfield name='com_author' value='$(name)'/><postfield name='com_data' value='$(comment)'/><postfield name='persistent' value=''/><postfield name='send_notification' value=''/><postfield name='cmd_typ' value='%d'/><postfield name='cmd_mod' value='%d'/><postfield name='content' value='wml'/></go>\n",COMMAND_CGI,url_encode(host_name),service_desc,CMD_ACKNOWLEDGE_SVC_PROBLEM,CMDMODE_COMMIT);

recompiled and it appears to work now that the service description is getting passed and not the host name as the description.