Page 1 of 1
Hostgroup URL
Posted: Fri Feb 26, 2021 6:28 am
by Support_Talea
Hi,
I have a hostgroup configuration like this "image hostgroup"
how do they work? I don't see the link anywhere in the dashboard.
Where are they located?
Regards,
-Fede
Re: Hostgroup URL
Posted: Fri Feb 26, 2021 4:49 pm
by dchurch
You can get a description of what a field does and what it's used for by using the dropdown in the top right of the page next to the star.
Screenshot 2021-02-26 154813.png
Hostgroup - notes url
This variable is used to define an optional URL that can be used to provide more information about the host group. If you specify an URL, you will see a red folder icon in the CGIs (when you are viewing hostgroup information) that links to the URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to access the CGIs (i.e. /cgi-bin/nagios/). This can be very useful if you want to make detailed information on the host group, emergency contact methods, etc. available to other support staff.
Parameter name: notes_url
Required: no
(To be honest, I'm still searching for where to see this reflected in Nagios XI. I'll add more when I figure that out.)
Re: Hostgroup URL
Posted: Fri Feb 26, 2021 5:11 pm
by dchurch
The Host group notes URL is not used anywhere in the administration interface, but it's saved in a macro which could be used in a notification or other command -
https://assets.nagios.com/downloads/nag ... groupnotes
Re: Hostgroup URL
Posted: Sun Feb 28, 2021 3:13 pm
by Support_Talea
Hi,
Ok, I'll see how to implement it and if it will be useful to me.
I ask one thing, because I have a couple of problems that I can't solve.
I have several hosts inserted inside the hostgroups tab and many hostgroups inserted inside the hosts.
How do I extract from select mysql the hosts in which hostgroups are located and if they are not included?
Regards,
-Fede
Re: Hostgroup URL
Posted: Mon Mar 01, 2021 10:42 am
by dchurch
Support_Talea wrote:Ok, I'll see how to implement it and if it will be useful to me.
Here's a tutorial on how to set up a custom notification using macros.
Support_Talea wrote:I have several hosts inserted inside the hostgroups tab and many hostgroups inserted inside the hosts.
How do I extract from select mysql the hosts in which hostgroups are located and if they are not included?
If you mean "show me hosts that are NOT part of a host group", then you can use this command to extract it from Nagios Core's config files:
Code: Select all
ls -1 /usr/local/nagios/etc/hosts/ | sed -e 's/\.cfg//g' | grep -vwf <(grep members /usr/local/nagios/etc/hostgroups.cfg | sed -e 's/members//g' | tr -d '[:blank:]' | tr , '\n' | sort -u)
Re: Hostgroup URL
Posted: Mon Mar 01, 2021 4:17 pm
by Support_Talea
Fantastic, very beautiful.
Thank you so much
-Fede