Nagiosgraph and Hostgroups

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.
csward
Posts: 46
Joined: Fri Mar 08, 2013 4:37 pm

Nagiosgraph and Hostgroups

Post 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!
rajesh.mehra
Posts: 35
Joined: Mon Jan 27, 2014 2:38 am
Location: New Delhi, India

Re: Nagiosgraph and Hostgroups

Post 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>

csward
Posts: 46
Joined: Fri Mar 08, 2013 4:37 pm

Re: Nagiosgraph and Hostgroups

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagiosgraph and Hostgroups

Post 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.
rajesh.mehra
Posts: 35
Joined: Mon Jan 27, 2014 2:38 am
Location: New Delhi, India

Re: Nagiosgraph and Hostgroups

Post 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.
csward
Posts: 46
Joined: Fri Mar 08, 2013 4:37 pm

Re: Nagiosgraph and Hostgroups

Post by csward »

It doesn't seem to be pulling them into the drop down for groups. I'll take a look again tomorrow. Thanks!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagiosgraph and Hostgroups

Post by slansing »

Hi csward,

Did you dig anything up?
csward
Posts: 46
Joined: Fri Mar 08, 2013 4:37 pm

Re: Nagiosgraph and Hostgroups

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagiosgraph and Hostgroups

Post by slansing »

Cool, if you need some help I'll give this a shot on one of my core test systems.
csward
Posts: 46
Joined: Fri Mar 08, 2013 4:37 pm

Re: Nagiosgraph and Hostgroups

Post 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.
Locked