Page 1 of 2

Nagiosgraph and Hostgroups

Posted: Tue Jun 17, 2014 11:53 am
by csward
Hello, I've installed Nagiosgraph and am able to see the graphs on my services by individual host only, but when I look at hostgroups I don't have the icon to display the graphs. I want to be able to see a specific service for all servers. Here is my config:

Windows.cfg:
define service{
use generic-service,nagiosgraph
hostgroup_name Prod_Server
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}

Commands.cfg:
define command {
command_name process-service-perfdata-for-nagiosgraph
command_line /usr/local/nagiosgraph/bin/insert.pl
}

nagios.cfg:

# process nagios performance data using nagiosgraph
process_performance_data=1
service_perfdata_file=/tmp/perfdata.log
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata-for-nagiosgraph

Any help would be appreciated.

Thanks!

Re: Nagiosgraph and Hostgroups

Posted: Tue Jun 17, 2014 10:58 pm
by rajesh.mehra
Hi Csward

This one help you

By default Nagiosgraph calls show.cgi in url but you can change urls according to your need.

1. Show service http://your.ip.address/nagiosgraph/cgi- ... ervice.cgi
2. Show hosts http://your.ip.address/nagiosgraph/cgi-bin/showhost.cgi

4. Show hostgroup http://your.ip.address/nagiosgraph/cgi- ... wgroup.cgi


:) - Add links to graphs in the Nagios sidebar (side.php or side.html):

Code: Select all


<ul>
<li><a href="/nagiosgraph/cgi-bin/show.cgi" target="main">Graphs</a></li>
<li><a href="/nagiosgraph/cgi-bin/showhost.cgi" target="main">Graphs by Host</a></li>
<li><a href="/nagiosgraph/cgi-bin/showservice.cgi" target="main">Graphs by Service</a></li>
<li><a href="/nagiosgraph/cgi-bin/showgroup.cgi" target="main">Graphs by Group</a></li>
</ul>


Re: Nagiosgraph and Hostgroups

Posted: Wed Jun 18, 2014 9:27 am
by csward
Ohh, I like! So, do I have to create different groups in the groupsdb.conf file under nagiosgraph instead of being able to use my groups already associated in my windows.cfg file?

Thanks

Re: Nagiosgraph and Hostgroups

Posted: Wed Jun 18, 2014 5:00 pm
by slansing
I'm not even sure on that one myself, I'll look into it tomorrow and see what I can dig up, perhaps rajesh will reply back.

Re: Nagiosgraph and Hostgroups

Posted: Wed Jun 18, 2014 11:18 pm
by rajesh.mehra
Hi Csward

I think don,t need to create definition in groupdb.conf. If you have showgroup.cgi and service.cgi in nagiosgraph.
Nagiosgraph will automatilcally trap hostgroup and service name from nagios.

Re: Nagiosgraph and Hostgroups

Posted: Wed Jun 18, 2014 11:22 pm
by csward
It doesn't seem to be pulling them into the drop down for groups. I'll take a look again tomorrow. Thanks!

Re: Nagiosgraph and Hostgroups

Posted: Thu Jun 26, 2014 12:09 pm
by slansing
Hi csward,

Did you dig anything up?

Re: Nagiosgraph and Hostgroups

Posted: Thu Jun 26, 2014 12:37 pm
by csward
I'll look at it today and let you know. I'm pretty sure I need to add them in the groupdb.conf.

Re: Nagiosgraph and Hostgroups

Posted: Fri Jun 27, 2014 10:33 am
by slansing
Cool, if you need some help I'll give this a shot on one of my core test systems.

Re: Nagiosgraph and Hostgroups

Posted: Fri Jun 27, 2014 10:39 am
by csward
Thanks, I've tried various different configurations to the groupdb.conf file with no luck.

Ex.
PING=<Servername>,PING&db=ping,rta
PING=<Servername>,PING&db=ping,losspct

The groups show up, but the servers don't list and the data doesn't populate.