mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add apachepoller
git-svn-id: http://www.observium.org/svn/observer/trunk@162 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
30
includes/polling/apachestats.inc.php
Executable file
30
includes/polling/apachestats.inc.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
echo("Collecting Apache statistics...");
|
||||
|
||||
$apacherrd = "rrd/" . $device['hostname'] . "-apache.rrd";
|
||||
if(!is_file($apacherrd)) {
|
||||
$woo= `rrdtool create $apacherrd \
|
||||
DS:bits:COUNTER:600:U:10000000 \
|
||||
DS:hits:COUNTER:600:U:10000000 \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797`;
|
||||
}
|
||||
|
||||
$this_host = $device['hostname'];
|
||||
|
||||
list($ahits,$abits) = explode("\n", `./get-apache.sh $this_host`);
|
||||
$abits = $abits * 8;
|
||||
|
||||
rrdtool_update($apacherrd,"N:$abits:$ahits");
|
||||
|
||||
echo("\n");
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user