diff options
author | Urban Müller | 2017-12-21 14:16:06 +0100 |
---|---|---|
committer | Urban Müller | 2017-12-21 14:26:11 +0100 |
commit | 41f4aacd85b7d5a24f91a5c6d0d7f44fe3397cd3 (patch) | |
tree | 30edb7b1f996c5349f7034e153d6d5d784b221cd | |
parent | b7155231481c4a7fa7897371f6dbfded3c637db9 (diff) | |
download | itools-41f4aacd85b7d5a24f91a5c6d0d7f44fe3397cd3.tar.gz itools-41f4aacd85b7d5a24f91a5c6d0d7f44fe3397cd3.tar.bz2 itools-41f4aacd85b7d5a24f91a5c6d0d7f44fe3397cd3.zip |
better error overview
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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" : ""; |