summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 9b31421..a65e98b 100644
--- a/it.class
+++ b/it.class
@@ -266,7 +266,7 @@ static function error($p = array())
$body .= $p['id'] ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . " (previous err: " . it::date('', $errstamp) . ")\n\n" : "";
$body .= $origp['blockmail'] ? "Block-resend: " . $origp['blockmail'] . " seconds\n\n" : "";
$body .= "Overview: ssh " . getenv('HOSTNAME') . " 'cat /tmp/alertdata/alertlog | grep \"$trace\"'\n\n";
- $body .= ($t = it::exec('grep {0} /tmp/alertdata/alertlog 2>/dev/null | tail -10 | cut -b 1-100', $trace)) ? "Most-recent: (last 10 today)\n$t\n" : "";
+ $body .= ($t = it::exec('grep {0} /tmp/alertdata/alertlog 2>/dev/null | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace)) ? "Histogram: (last 10 minutes)\n$t\n" : "";
$body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : "";
$body .= $_POST ? "\$_POST: " . var_export($_POST, true) . "\n\n" : "";
$body .= $_COOKIE ? "\$_COOKIE: " . var_export($_COOKIE, true) . "\n\n" : "";