hide hosts

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
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

hide hosts

Post by eltrasimaco »

somewhere I read about the "hidden host" hack, where assigning a host to a hostgroup with the register 0 attribute hids it in the GUI. Have tried it unsuccessfully as in the 4.0.8 version, Is there any other way to accomplish it, excluding the user auth way?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: hide hosts

Post by tmcdonald »

The register 0 line is not for visually hiding a host or host group. Rather, it basically means "Do not make this a real host/group to be monitored, instead treat it as a template config that other hosts/groups can use". If you set register 0 on either object, the effect is, for the most part, as if you did not write that config at all. While this does have the side effect of hiding the object in the GUI, the primary use is to treat the config as a template.

Observe the "DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!" comments in the config file examples:

https://github.com/NagiosEnterprises/na ... tes.cfg.in
Former Nagios employee
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: hide hosts

Post by eltrasimaco »

Thanks, got it, so ... Is there any other way to accomplish "host hiding" in the gui? Without user auth, if possible.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: hide hosts

Post by dwhitfield »

You are going to have to tell us a bit more about what you are trying to accomplish.

One thing you could do is just change your host names and sort them such that the ones you don't want to see are at the end.

If you really just don't want them to show up at all, you could write some javascript to exclude them, but outside of that not sure how you are going to get what you want without userauth.
Locked