mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
fixed eventlog *again*. eventlog rewrite incoming, i think.
git-svn-id: http://www.observium.org/svn/observer/trunk@551 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
$update .= ", `$oid` = '".mysql_real_escape_string($this_port[$oid])."'";
|
||||
#mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $port['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '".$oid . ": ".$port[$oid]." -> " . $this_port[$oid]."')");
|
||||
#eventlog($device['device_id'], 'interface', $port['interface_id'], $oid . ": ".$port[$oid]." -> " . $this_port[$oid]);
|
||||
mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '".$oid . ": ".$port[$oid]." -> " . $this_port[$oid]."')");
|
||||
echo($oid . " ");
|
||||
}
|
||||
}
|
||||
@@ -140,18 +141,19 @@
|
||||
if ( $this_port[$oid] != $port[$oid] ) { // If data has changed, build a query
|
||||
$update .= ", `$oid` = '".mres($this_port[$oid])."'";
|
||||
echo("PAgP ");
|
||||
mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '$oid -> ".$this_port[$oid]."')");
|
||||
}
|
||||
}
|
||||
}
|
||||
// End Update PAgP
|
||||
|
||||
// Do Eventlogging
|
||||
$eventlog_oids = array('ifDescr', 'ifName', 'ifAlias', 'ifOperStatus', 'ifAdminStatus');
|
||||
foreach ($data_oids as $oid) { // Loop the OIDs
|
||||
if ( $port[$oid] != $this_port[oid]) {
|
||||
mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '$oid -> ".$this_port[$oid]."')");
|
||||
}
|
||||
}
|
||||
# $eventlog_oids = array('ifDescr', 'ifName', 'ifAlias', 'ifOperStatus', 'ifAdminStatus');
|
||||
# foreach ($data_oids as $oid) { // Loop the OIDs
|
||||
# if ( $port[$oid] != $this_port[oid]) {
|
||||
# mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '$oid -> ".$this_port[$oid]."')");
|
||||
# }
|
||||
# }
|
||||
// End Eventlogging
|
||||
|
||||
/// Do EtherLike-MIB
|
||||
|
||||
Reference in New Issue
Block a user