I'm new to CACTI and have a problem creating a graph. I followed the steps in the HOWTO and set up a script that polls Apache requests per second and currently beeing processed and want to graph those. Unfortunately the event doesn't get polled automatically when all other services (ping, load average) get polled. Maybe someone can help!
The script is called apache.pl:
Code: Select all
#!/usr/bin/perl
$output = `/bin/bash -c 'wget --quiet -O - \"https:\/\/localhost\/server-status"'`;
$output =~ /(.*) requests\/sec/;
print "requests_per_second:".$1." ";
$output =~ /(.*) requests currently being processed/;
print "requests_currently:".$1;
I've set up CACTI as follows (screenshots):requests_per_second:.00521 requests_currently:1
Data Input Methods:
http://tinypic.com/view/?pic=qz51rm
Data Templates:
http://tinypic.com/view/?pic=qz525k
Date Sources:
http://tinypic.com/view/?pic=qz52cp
Graph Templates:
http://tinypic.com/view/?pic=qz52q1
Graph Management:
http://tinypic.com/view/?pic=qz52xg
Unfortunately the RRA Files never gets written and I have no graph. Where is the problem? I enabled the graph in devices for localhost and the device poller lists the event:
http://tinypic.com/view/?pic=qz54li
When I execute the command on shell, the RRA apears:
Code: Select all
/usr/bin/rrdtool create /usr/share/apache/monitoring/cacti/rra/localhost_requests_per_second_13.rrd --step 300 DS:requests_currently:GAUGE:600:0:100 DS:requests_per_second:GAUGE:600:0:100 RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797