Reputation: 4662
I have installed Nagiosgraph on my CentOS 7 with NGINX + PHP-FPM, manually, with this two HowTos:
http://sourceforge.net/p/nagiosgraph/git/ci/master/tree/INSTALL http://sachinharma.blogspot.com/2013/08/nagiosgraph-graphs-in-nagios-on_7.html
All seems work - but I haven't any real graphs:
Please, pay attention - there is yellow rectangle - it's selected by mouse, and looks like - there is some "graph", but it won't display.
I have data in rrd directory:
# rrdtool dump /var/nagios/rrd/www.dev.domain.com/Current%20Load___load1.rrd
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd">
<!-- Round Robin Database Dump -->
<rrd>
<version>0003</version>
<step>300</step> <!-- Seconds -->
<lastupdate>1435935645</lastupdate> <!-- 2015-07-03 15:00:45 UTC -->
<ds>
<name> data </name>
<type> GAUGE </type>
<minimal_heartbeat>600</minimal_heartbeat>
<min>NaN</min>
<max>NaN</max>
...
No error in logs, etc.
In nagios.cfg
:
...
process_performance_data=1
service_perfdata_file=/var/log/nagios/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-graph
...
In templates.cfg
:
define service {
name graphed-service
action_url show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver='showGraphPopup(this)' onMouseOut='hideGraphPopup()' rel='showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&period=week&rrdopts=-w+450+-j
register 0
}
In commands.cfg
:
define command {
command_name process-service-graph
command_line /bin/perl /usr/local/nagios/libexec/insert.pl
}
And finally - in host config:
define service{
use local-service,graphed-service
host_name www.dev.domain.com
service_description Tomcat mem
check_command check-tomcat-mem!8080!admin!Iivoh4pe
notifications_enabled 1
}
What I'm doing wrong here?
Upvotes: 0
Views: 2102
Reputation: 4662
Problem was in my /opt/nagiosgraph/etc/nagiosgraph.conf
.
There was:
nagiosgraphcgiurl = /usr/local/nagios/sbin/
Instead of:
nagiosgraphcgiurl = /nagios/cgi-bin
This fixed my problem.
Upvotes: 1