Nagios 3.0.3 - barfs on spaces in service_name


I recall Nagios 2 had no problem with spaces in service names.

Nagios 3.0.3 (on SuSE 9) seems to not approve of them. No errors on verify or startup, and the service does seem to get checked, but attempting to view the service detail yields an authorization error (“It seems you are not authorized to view …”)

Is this a bug or a feature?


I believe service_description can contain spaces, although I’m used to avoid them in any configuration files I edit, just because it is safer that way. But the docs say spaces are allowed: … ml#service

As for the authorization error you’re getting, it is due to permissions set in your cgi.cfg file. Edit it and set the permissions you need.


Thanks, For the purposes of informing others who may be baffled by this bug, the authorization error is the result of having a space in the service_description (not the “service name”, sorry for the error). It’s not not a configuration error, because when I change the name of my service from “Service A” to “ServiceA”, everything is fine… I am sure this will get fixed sooner or later, I am just too lazy to figure out how to find the “official” bug list.

This is Nagios 3.0.3 built and running under SuSE Enterprise 9.


what browser are you using? i.e. do you get this happening with both IE and firefox?
What difference is in the url of the hyperlink between the working and non-working case?


[UPDATE: Aha, in the 3.0.4 release, I see "Fix for host/service name encoding in CGIs (trends and availability reports, etc.) ". Since it is 5 PM Friday and one NEVER upgrades stuff right before one goes home for the weekend, I will upgrade on Monday and see what happens. Possibly one of these bad encodings is getting passed to logic that decides on whether notifications get sent.]

I have only Firefox installed, sorry no IE. I can’t actually reliably reproduce this now on Firefox.

However, I am seeing some weird behavior with respect to viewing alert histories of services with spaces. I have a service with a service description “TemPageR Int Temp Deg F X100”. There are no quotes in the config file’s definition.

When I view the alert history linked from the service detail page, I see the heading

Service ‘TemPageR Int Temp Deg F X100’ On Host ‘temppagr-brousseau-3’

at the top of the page, when I check “Hide process messages”, the headline is rewritten with the text

Service ‘TemPageR+Int+Temp+Deg+F+X100’ On Host ‘temppagr-brousseau-3’

and all the alerts disappear. When I Uncheck “Hide process messages” and reload again, the headline text is yet again rewritten weirdly,

Service ‘TemPageR%2BInt%2BTemp%2BDeg%2BF%2BX100’ On Host ‘temppagr-brousseau-3’

And still, no events visible. Also, Nagios seems to have failed to send a notification for this service when it went over limits today.

The strings above are what get put in the dataTitle object, so it’s not a Firefox rendering problem. Someone’s string conversion code got whacked! Hopefully it is not an invitation to unterminated strings …