mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
fortigate hardware from sysObjectID
git-svn-id: http://www.observium.org/svn/observer/trunk@1676 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -33,7 +33,6 @@ if(!strpos($sysDescr, "XOS")) {
|
||||
}
|
||||
|
||||
|
||||
$sysObjectID = snmp_get($device, "sysObjectID.0", "-Oqvn");
|
||||
$hardware = rewrite_extreme_hardware($sysObjectID);
|
||||
if($hardware == $sysObjectID) { unset($hardware); }
|
||||
|
||||
|
||||
@@ -4,11 +4,17 @@ echo("Fortinet Fortigate Poller\n");
|
||||
|
||||
## FIX ME - find some fortigate hardware to test this on, and to update and generify it
|
||||
|
||||
$fnSysVersion = shell_exec($config['snmpget']. " -M ".$config['mibdir']." -m FORTINET-MIB-280 -".$device['snmpver']." -Ovq -c ".$device['community']." ".$device['hostname'].":".$device['port']." fnSysVersion.0");
|
||||
$serial = shell_exec($config['snmpget']. " -M ".$config['mibdir']." -m FORTINET-MIB-280 -".$device['snmpver']." -Ovq -c ".$device['community']." ".$device['hostname'].":".$device['port']." fnSysSerial.0");
|
||||
$fnSysVersion = snmp_get($device, "FORTINET-MIB-280::fnSysVersion.0", "-Ovq");
|
||||
$serial = snmp_get($device, "FORTINET-MIB-280::fnSysSerial.0", "-Ovq");
|
||||
|
||||
$version = preg_replace("/(.+)\ (.+),(.+),(.+)/", "Fortinet \\1||\\2||\\3||\\4", $fnSysVersion);
|
||||
list($hardware,$version,$features) = explode("||", $version);
|
||||
echo("$fnSysVersion");
|
||||
|
||||
$version = preg_replace("/(.+),(.+),(.+)/", "\\1||\\2||\\3", $fnSysVersion);
|
||||
list($version,$features) = explode("||", $version);
|
||||
|
||||
if(isset($rewrite_fortinet_hardware[$sysObjectID])) {
|
||||
$hardware = $rewrite_fortinet_hardware[$sysObjectID];
|
||||
}
|
||||
|
||||
#$cmd = $config['snmpget'] . " -M ".$config['mibdir']. " -m FORTINET-MIB-280 -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'];
|
||||
#$cmd .= " fnSysCpuUsage.0 fnSysMemUsage.0 fnSysSesCount.0 fnSysMemCapacity.0";
|
||||
@@ -19,7 +25,7 @@ $sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/fortigate_session
|
||||
|
||||
$sessions = snmp_get($device, "fnSysSesCount.0", "FORTINET-MIB-280");
|
||||
|
||||
if(is_numeric($sessions)
|
||||
if(is_numeric($sessions))
|
||||
{
|
||||
if (!is_file($sessrrd))
|
||||
{
|
||||
@@ -28,7 +34,7 @@ if(is_numeric($sessions)
|
||||
RRA:MAX:0.5:1:800 RRA:MAX:0.5:6:800 RRA:MAX:0.5:24:800 RRA:MAX:0.5:288:800`;
|
||||
}
|
||||
shell_exec($config['rrdtool'] . " update $sessrrd N:$ses");
|
||||
$graphs['fortigate_sessions']
|
||||
$graphs['fortigate_sessions'] = TRUE;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user