mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 16:26:55 +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])."'";
|
$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]."')");
|
#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]);
|
#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 . " ");
|
echo($oid . " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,18 +141,19 @@
|
|||||||
if ( $this_port[$oid] != $port[$oid] ) { // If data has changed, build a query
|
if ( $this_port[$oid] != $port[$oid] ) { // If data has changed, build a query
|
||||||
$update .= ", `$oid` = '".mres($this_port[$oid])."'";
|
$update .= ", `$oid` = '".mres($this_port[$oid])."'";
|
||||||
echo("PAgP ");
|
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
|
// End Update PAgP
|
||||||
|
|
||||||
// Do Eventlogging
|
// Do Eventlogging
|
||||||
$eventlog_oids = array('ifDescr', 'ifName', 'ifAlias', 'ifOperStatus', 'ifAdminStatus');
|
# $eventlog_oids = array('ifDescr', 'ifName', 'ifAlias', 'ifOperStatus', 'ifAdminStatus');
|
||||||
foreach ($data_oids as $oid) { // Loop the OIDs
|
# foreach ($data_oids as $oid) { // Loop the OIDs
|
||||||
if ( $port[$oid] != $this_port[oid]) {
|
# 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]."')");
|
# mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '$oid -> ".$this_port[$oid]."')");
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
// End Eventlogging
|
// End Eventlogging
|
||||||
|
|
||||||
/// Do EtherLike-MIB
|
/// Do EtherLike-MIB
|
||||||
|
|||||||
Reference in New Issue
Block a user