git-svn-id: http://www.observium.org/svn/observer/trunk@369 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-03-24 11:16:58 +00:00
parent 0a2d624578
commit 8724fc696b
+3 -3
View File
@@ -23,7 +23,7 @@ while($peer = mysql_fetch_array($peers)) {
$peerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/bgp-" . $peer['bgpPeerIdentifier'] . ".rrd";
if(!is_file($peerrrd)) {
$woo = `rrdtool create $peerrrd \
$woo = shell_exec($config['rrdtool'] . " create $peerrrd \
DS:bgpPeerOutUpdates:COUNTER:600:U:100000000000 \
DS:bgpPeerInUpdates:COUNTER:600:U:100000000000 \
DS:bgpPeerOutTotal:COUNTER:600:U:100000000000 \
@@ -32,10 +32,10 @@ while($peer = mysql_fetch_array($peers)) {
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797`;
RRA:AVERAGE:0.5:288:797");
}
rrdtool_update($peerrrd, "N:$bgpPeerOutUpdates:$bgpPeerInUpdates:$bgpPeerOutTotalMessages:$bgpPeerInTotalMesages:$bgpPeerFsmEstablishedTime");
rrdtool_update("$peerrrd", "N:$bgpPeerOutUpdates:$bgpPeerInUpdates:$bgpPeerOutTotalMessages:$bgpPeerInTotalMesages:$bgpPeerFsmEstablishedTime");
$update = "UPDATE bgpPeers SET bgpPeerState = '$bgpPeerState', bgpPeerAdminStatus = '$bgpPeerAdminStatus', ";
$update .= "bgpPeerFsmEstablishedTime = '$bgpPeerFsmEstablishedTime', bgpPeerInUpdates = '$bgpPeerInUpdates' , bgpLocalAddr = '$bgpLocalAddr' , bgpPeerOutUpdates = '$bgpPeerOutUpdates'";