Re: [Nagios-devel] [Nagios-users] [Fwd: All hosts status

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [Nagios-users] [Fwd: All hosts status

Post by Guest »

Hi Marc,

I've got a hold of this and a fix now.

In the availability report, if you selected a host or service group, =20
it passed the host/group chosen in step 2 over in the URL to step 3 =20
as, for example, Telecity+Router+1 - which is correct.

However, it then URL encoded the value back to the HTML source of step =20
3 - e.g.
.

However when you submit this form, the browser then converts the + =20
characters into %2B's - e.g. Telecity%2BRouter%2B1. Nagios then =20
interpets the host as Telecity+Router+1, which obviously doesn't exist.

It's a simple fix, thankfully! Unfortunately I don't know how to =20
create diff patches, so I can only tell you what to change:

In avail.cgi, line 650:

from:

printf("\n",url_encode(host_name));

to:

printf("\n",host_name);

In avail.cgi, line 654:

from:

printf("\n",url_encode(servicegroup_name));

to:

printf("\n",servicegroup_name);

Note that host groups and services didn't suffer this problem - just =20
hosts and service groups!

Can this fix make into 3.0.3?

Thanks,

Andy

Quoting Andy Shellam :

> Hi Marc,
>
> Quoting Marc Powell :
>
>>
>> On May 29, 2008, at 1:23 PM, Andy Shellam wrote:
>>
>>> About the below e-mail I sent on Tuesday; the reports appears to have
>>> resolved themselves - all host statuses are now appearing as up from
>>> the
>>> 28th May onwards - not quite sure why they're showing as
>>> undetermined on
>>> the 27th because I have the event log covering all of the 27th,
>>> although
>>> there aren't any "CURRENT HOST STATE" lines in the 27th's log file,
>>> but
>>> there is in the 28th.
>>
>> You've just explained it. Nagios couldn't determine the host state
>> from the log files for the date range +backtracked archives that you
>> specified and it won't lie by arbitrarily choosing a state to start.
>> You can either increase the count of backtracked archives to include
>> one that definitively sets the host state, choose the First Assumed
>> State or configure nagios to log_initial_states at each log rotation.
>
> Ah, that last option is probably what I'm looking for - I thought I
> had that enabled, but possibly not.
>
>>
>>> Anyway. It's still not possible for me to view the status of the
>>> "Telecity Router 1" or "Telehouse Router 1" hosts, with the same "you
>>> are not authorised" message, yet I can read the status perfectly
>>> fine in
>>> the other CGIs for these hosts.
>>
>> I don't have a suggestion here and don't have the time right now to go
>> poking around in the code to see what it's doing differently for a clue.
>
> I'll have a look myself when I get chance although I'm by no means a
> decent C programmer! I'm guessing it has to do with the spaces in the
> hostname, as I've had issues with that before (previously on this and
> -devel list.)
>
> If I find anything I'll submit a patch to -devel.
>
> Thanks,
>
> Andy
>
> --
> Andy Shellam
> Business Systems Architect
>
> Network Mail
> NetServe Support
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nagios-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-users
> ::: Please include Nagios version, plugin version (-v) and OS when =20
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

--=20
Andy Shellam
Business Systems Architect

Network Mail
NetServe Support





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked