summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2019-02-25 10:59:13 +0100
committerUrban Müller2019-02-25 10:59:13 +0100
commitfbca4d57db71cfbd5d9ef52a32ccd8688a37b3ce (patch)
tree354abf164715a080d36b7d7065e7abb443b7d241
parent808eca4aad0c55a5fd5a8950e2efe8a528084932 (diff)
downloaditools-fbca4d57db71cfbd5d9ef52a32ccd8688a37b3ce.tar.gz
itools-fbca4d57db71cfbd5d9ef52a32ccd8688a37b3ce.tar.bz2
itools-fbca4d57db71cfbd5d9ef52a32ccd8688a37b3ce.zip
handle single quotes in trace
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index e56823b..937cde7 100644
--- a/it.class
+++ b/it.class
@@ -272,7 +272,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 .= !$trace ? "" : "Overview: ssh " . getenv('HOSTNAME') . " 'cat /tmp/alertdata/alertlog | fgrep \"$trace\"'\n\n";
+ $body .= !$trace ? "" : "Overview: ssh " . getenv('HOSTNAME') . " 'cat /tmp/alertdata/alertlog | fgrep \"" . it::replace(["'" => " "], $trace) . "\"'\n\n";
$body .= ($trace and $t = it::exec('grep -h {0} `ls /tmp/alertdata/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t\n" : "";
$body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : "";
$body .= $_POST ? "\$_POST: " . var_export($_POST, true) . "\n\n" : "";