Consists of an XML file and a little php scripting.
Put the php script in the <cacti dir>/scripts/ directory.
The source for the script is:
Code: Select all
<?php
#!/usr/bin/php -q
$no_http_headers = true;
error_reporting(E_ERROR);
$IP = $_SERVER["argv"][1];
$Community = $_SERVER["argv"][2];
$a[1] = snmpwalk($IP,$Community,"ifTable.ifEntry.ifIndex");
$a[2] = snmpwalk($IP,$Community,"ifTable.ifEntry.ifType");
for ($i=0; $i < count($a[1]); $i++)
{
if (strpos($a[2][$i],"adsl"))
$index = ltrim(substr($a[1][$i],8,3));
}
$LA = substr(snmpget($IP,$Community,"1.3.6.1.2.1.10.94.1.1.3.1.5.$index"),9,3);
$RA = substr(snmpget($IP,$Community,"1.3.6.1.2.1.10.94.1.1.2.1.5.$index"),9,3);
$LP = substr(snmpget($IP,$Community,"1.3.6.1.2.1.10.94.1.1.3.1.7.$index"),9,3);
$RP = substr(snmpget($IP,$Community,"1.3.6.1.2.1.10.94.1.1.2.1.7.$index"),9,3);
$LS = substr(snmpget($IP,$Community,"1.3.6.1.2.1.10.94.1.1.3.1.4.$index"),9,3);
$RS = substr(snmpget($IP,$Community,"1.3.6.1.2.1.10.94.1.1.2.1.4.$index"),9,3);
print "RA:" . $RA . " LA:" . $LA . " ";
print "LO:" . $LP . " RO:" . $RP . " ";
print "LS:" . $LS . " RS:" . $RS . "\n";
?>
this should work in combination with the XML file.
might be that the absolute paths in the Data Imput Methods are wrong
The parameters that are monitored are:
Local and Remote SNR.
Local and Remote Output Power
Local and Remote Attenuation