Service Comments

I’ve created some nagios monitors, but I want to put the specific URL for the http monitor I’ve set up. These are long URL’s like:
http://localhost:9102/monitor.faces?system=mqMainFrame&test=D146MQ01

However, when I put this in the Service Comments section of the monitor, the comments get posted without the ampersand. Like this:
http://localhost:9102/monitor.faces?system=mqMainFrametest=D146MQ01

Why does the service comments section remove the & character from the comment posting?

Running nagios 1.3.

-andrew

try using a backslash in front of the & (ie: &)

Luca

yeah, i tried that all ready. doesn’t make a difference.

for what it’s worth, i found the answer. cgiutils.c strips pipes, ampersands and semicolons from the comment buffer. there’s no way around this, short of changing the source and recompiling. i wonder if this invalidates the service contract? :stuck_out_tongue:

my bad, it’s actuall in getcgi.c in the
sanitize_cgi_input() function (line #31).

-andrew

It’s open source, so you can do whatever you want with it I suppose.