don't send notify mail if we couldn't get the uptime

git-svn-id: http://www.observium.org/svn/observer/trunk@861 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-15 23:41:56 +00:00
parent 07302de67a
commit 5370ef9b55
+3
View File
@@ -72,6 +72,8 @@ if ($device['os'] == "junos")
} }
} }
if ($bgpPeerFsmEstablishedTime)
{
if ($bgpPeerFsmEstablishedTime < $peer['bgpPeerFsmEstablishedTime'] || $bgpPeerState != $peer['bgpPeerState']) if ($bgpPeerFsmEstablishedTime < $peer['bgpPeerFsmEstablishedTime'] || $bgpPeerState != $peer['bgpPeerState'])
{ {
if ($device['sysContact']) { $email = $device['sysContact']; } else { $email = $config['email_default']; } if ($device['sysContact']) { $email = $device['sysContact']; } else { $email = $config['email_default']; }
@@ -91,6 +93,7 @@ if ($device['os'] == "junos")
eventlog('BGP Session Down: ' . $peer['bgpPeerIdentifier'] . ' (AS' . $peer['bgpPeerRemoteAs'] . ')', $device['device_id']); eventlog('BGP Session Down: ' . $peer['bgpPeerIdentifier'] . ' (AS' . $peer['bgpPeerRemoteAs'] . ')', $device['device_id']);
} }
} }
}
$peerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("bgp-" . $peer['bgpPeerIdentifier'] . ".rrd"); $peerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("bgp-" . $peer['bgpPeerIdentifier'] . ".rrd");
if(!is_file($peerrrd)) { if(!is_file($peerrrd)) {