Re: [Nagios-devel] Orphan hosts in hostgroup list

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] Orphan hosts in hostgroup list

Post by Guest »

--========GMX79401217448194641416
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Some improvements (I think...):

The orphan hostgroups and servicegroups are created every (!) time. So the link to extinfo.cgi works, too. (I've tried the schedule downtime for all services of an orphan servicegroup, though I think it's not very useful.)
Maybe I'll find a way how to control the creation of these groups by a config value. Commands can be submitted to the orphan groups regardless of the show_orphan_... values so far.

You can modify your cgi.cfg file to show orphan groups (they aren't displayed by default). Put these two lines in your cgi configuration file:
show_orphan_hosts_hostgroup=1
show_orphan_services_servicegroup=1

The diffs should be applied to the current cvs files from the repository.

Regards
Bernd


-------- Original-Nachricht --------
> Datum: Tue, 29 Jul 2008 23:22:10 +0200
> Von: Arno Lehmann
> An: Nagios Developers List
> Betreff: Re: [Nagios-devel] Orphan hosts in hostgroup list

> Hi,
>
> 29.07.2008 21:47, Bernd Arnold wrote:
> > Hi,
> >
> > as the number of hosts grow, I sometimes would like to see which hosts
> are not added to any hostgroup.
>
> Good idea.
>
> > I've written a patch for status.c where an additional hostgroup called
> "Orphan Hosts" is created and filled automatically. The configuration files
> remain untouched.
> >
> > I kept things very simple, so this is what doesn't work:
> > - link to extinfo.cgi
>
> That's a disadvantage, though not critical IMO.
>
> > (permission warning, since the hostgroup is only added in status.c)
> > - a check if there is already a hostgroup named "orphans"
>
> Minor problem, too.
>
> > - show the additional hostgroup only when I need it (the hostgroup is
> always displayed)
>
> Do you intend to improve this?
>
> > The patch was created with "diff -U 3 cgi/status.c.orig cgi/status.c".
> The function create_orphan_hosts_hostgroup() is called where I thought it is
> best to be called (after fetching the authentication information).
> >
> > Maybe someone likes this feature... Comments are welcome.
>
> Sure... please do something similar for the service groups ;-)
>
> Arno
>
> > Regards
> > Bernd
> >
>
> --
> Arno Lehmann
> IT-Service Lehmann
> Sandstr. 6, 49080 Osnabrück
> www.its-lehmann.de
>

--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/e ... le/6169196

--========GMX79401217448194641416
Content-Type: application/octet-stream; name="cgiutils.c.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cgiutils.c.diff"

LS0tIGNnaS9jZ2l1dGlscy5jLm9yaWcJMjAwOC0wNy0zMCAyMDowNjoxNS4wMDAwMDAwMDAgKzAy
MDAKKysrIGNnaS9jZ2l1dGlscy5jCTIwMDgtMDctMzAgMjE6NDM6MzguMDAwMDAwMDAwICswMjAw
CkBAIC02OSw2ICs2OSw5IEBACiBjaGFyICAgICAgICAgICAgKnNwbHVua191cmw9TlVMTDsKIGlu
dCAgICAgICAgICAgICBsb2NrX2F1dGhvcl9uYW1lcz1UUlVFOwogCitpbnQgICAgICAgICAgICAg
c2hvd19vcnBoYW5faG9zdHNfaG9zdGdyb3VwPUZBTFNFOworaW50ICAgICAgICAgICAgIHNob3df
b3JwaGFuX3NlcnZpY2VzX3NlcnZpY2Vncm91cD1GQUxTRTsKKwogZXh0ZXJuIHRpbWVfdCAgIHBy
b2dyYW1fc3RhcnQ7CiBleHRlcm4gaW50ICAgICAgbmFnaW9zX3BpZDsKIGV4dGVybiBpbnQgICAg
ICBkYWVtb25fbW9kZTsKQEAgLTQwNSw2ICs0MDgsMTIgQEAKIAogCQllbHNlIGlmKCFzdHJjbXAo
dmFyLCJsb2NrX2F1dGhvcl9uYW1lcyIpKQogCQkJbG9ja19hdXRob3JfbmFtZXM9KGF0b2kodmFs
KT4wKT9UUlVFOkZBTFNFOworCisJCWVsc2UgaWYoIXN0cmNtcCh2YXIsInNob3dfb3JwaGFuX2hv
c3RzX2hvc3Rncm91cCIpKQorCQkJc2hvd19vcnBoYW5faG9zdHNfaG9zdGdyb3VwPShhdG9pKHZh
bCk+MCk/VFJVRTpGQUxTRTsKKworCQllbHNlIGlmKCFzdHJjbXAodmFyLCJzaG93X29ycGhhbl9z
ZXJ2aWNlc19zZXJ2aWNlZ3JvdXAiKSkKKwkJCXNob3dfb3JwaGFuX3NlcnZpY2VzX3NlcnZpY2Vn
cm91cD0oYXRvaSh2YWwpPjApP1RSVUU6RkFMU0U7CiAgCSAgICAgICAgfQogCiAJLyogZnJlZSBt
ZW1vcnkgYW5kIGNsb3NlIHRoZSBmaWxlICovCg==
--========GMX79401217448194641416
Content-Type: application/octet-stream; name="objects.c.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="objects.c.diff"

LS0tIGNvbW1vbi9vYmplY3RzLmMub3JpZwkyMDA4LTA3LT

...[email truncated]...


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