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:

However, when I put this in the Service Comments section of the monitor, the comments get posted without the ampersand. Like this:

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

Running nagios 1.3.


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


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).


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