Im trying to see if i can see the percentage dropped from deviation.
this is in thold_functions.php but reason why on deviation is we have a percentage selection
Baseline Deviation DOWN
Specifies allowed deviation in percentage for the lower bound threshold. If not set, lower bound threshold will not be checked at all.
(i have it at 20%)
but it would be nice in the alerts to show it as how much % of drop (but still like to keep the numbers too) and just add to the Subject/syslog alert.
Current
Message: ALERT: DEVICE Market xxxx - ISSUE is still below calculated baseline threshold 2599.98 with 1626
Trying to see
Message: ALERT: DEVICE Market xxxx - ISSUE is still below calculated baseline threshold 2599.98 with 1626 - 46% Down
Current
$subject = "ALERT: " . $item['name'] . ($thold_show_datasource ? " [$name]" : '') . ' ' . ($ra ? 'is still' : 'went') . ' ' . ($breach_up ? 'above' : 'below') . ' threshold of ' . ($breach_up ? $item['thold_hi'] : $item['thold_low']) . " with $currentval";
Trying to change
$subject = "ALERT: " . $item['name'] . ($thold_show_datasource ? " [$name]" : '') . ' ' . ($ra ? 'is still' : 'went') . ' ' . ($breach_up ? 'above' : 'below') . ' threshold of ' . ($breach_up ? $item['thold_hi'] : $item['thold_low']) . " with $currentval - $deviationpct ";
/* is in alert status */
if ($breach_up || $breach_down) {
$notify = false;
thold_debug('Threshold HI / Low check breached HI:' . $item['thold_hi'] . ' LOW:' . $item['thold_low'] . ' VALUE:' . $currentval);
$item['thold_fail_count']++;
$item['thold_alert'] = ($breach_up ? STAT_HI : STAT_LO);
/* Re-Alert? */
$ra = ($item['thold_fail_count'] > $trigger && $item['repeat_alert'] != 0 && $item['thold_fail_count'] % $item['repeat_alert'] == 0);
if ($item['thold_fail_count'] == $trigger || $ra) {
$notify = true;
}
$subject = "ALERT: " . $item['name'] . ($thold_show_datasource ? " [$name]" : '') . ' ' . ($ra ? 'is still' : 'went') . ' ' . ($breach_up ? 'above' : 'below') . ' threshold of ' . ($breach_up ? $item['thold_hi'] : $item['thold_low']) . " with $currentval";
if ($notify) {
thold_debug('Alerting is necessary');
if ($logset == 1) {
logger($item['name'], ($ra ? 'realert':'alert'), ($breach_up ? $item['thold_hi'] : $item['thold_low']), $currentval, $trigger, $item['thold_fail_count'], $url);
}
if (trim($alert_emails) != '') {
thold_mail($alert_emails, '', $subject, $msg, $file_array);
}
thold_log(array(
'type' => 0,
'time' => time(),
'host_id' => $item['host_id'],
'graph_id' => $graph_id,
'threshold_id' => $item['id'],
'threshold_value' => ($breach_up ? $item['thold_hi'] : $item['thold_low']),
'current' => $currentval,
'status' => ($ra ? ST_NOTIFYRA:ST_NOTIFYAL),
'description' => $subject,
'emails' => $alert_emails));
}
show Percentage Threshold from Baseline in Email/Syslog
Moderators: Developers, Moderators
Re: show Percentage Threshold from Baseline in Email/Syslog
Could there be any update to tholdPlugin coming soon
Who is online
Users browsing this forum: No registered users and 1 guest