summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class5
1 files changed, 3 insertions, 2 deletions
diff --git a/it.class b/it.class
index 5246336..e42bbeb 100644
--- a/it.class
+++ b/it.class
@@ -200,7 +200,8 @@ static function error($p = array())
else
{
$errstampfn = "/tmp/alertdata/errstamp_" . urlencode($p['id']);
- $errstampage = time() - @filemtime($errstampfn);
+ $errstamp = @filemtime($errstampfn);
+ $errstampage = time() - $errstamp;
$sendmail = $errstampage >= $p['graceperiod'] && $errstampage <= $p['graceperiod'] + $p['timewindow'];
if ($errstampage > $p['graceperiod'])
{
@@ -248,7 +249,7 @@ static function error($p = array())
$stackframes[] = $stackframe;
$body .= "Host: " . getenv('HOSTNAME') . "\n\n";
- $body .= $p['id'] ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . "\n\n" : "";
+ $body .= $p['id'] ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . " (previous err: " . it::date('', $errstamp) . ")\n\n" : "";
$body .= "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (started {$t}s before)" : "") . "\n\n"; # no it::date() due to time- debug param
$body .= "Overview: ssh " . getenv('HOSTNAME') . " 'tail -100000 /tmp/alertdata/alert.log | grep \"$trace\"'\n\n";
$body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : "";