Need assistance on finding hostsgroups
Need assistance on finding hostsgroups
Need to know which hostgroups are associated with each services. Is there a way to find that out through cli ? Or probably run a report on it ?
Re: Need assistance on finding hostsgroups
Here's one way, but it doesn't tell which services have no hostgroup.
grep hostgroup_name /usr/local/nagios/etc/services/* | awk '{print $NF "\t" $1}'
For a count you could do this.
cd /usr/local/nagios/etc/services/
grep -c hostgroup_name * | awk -F : '{print $NF "\t" $1}'
There are probably better, or prettier ways, but I like the shell...
grep hostgroup_name /usr/local/nagios/etc/services/* | awk '{print $NF "\t" $1}'
For a count you could do this.
cd /usr/local/nagios/etc/services/
grep -c hostgroup_name * | awk -F : '{print $NF "\t" $1}'
There are probably better, or prettier ways, but I like the shell...
Re: Need assistance on finding hostsgroups
For viewing purposes there's this, via the Hostgroup Overview page (you'll have the same options on the Hostgroup Summary page as well)
You do not have the required permissions to view the files attached to this post.
Be sure to check out the Knowledgebase for helpful articles and solutions!