Hi Guys,
I'm sure i have seen this done somewhere, but can't seem to find it by searching.
Can you tell me if it's possible to have thold change the graph colour (background or border) when a threshold is breached?
I need to visually highlight graphs which are cycling through a display using the 'cycle' plugin.
Thanks in advance for any suggestions!
Change graph colour with thold?
Moderators: Developers, Moderators
Re: Change graph colour with thold?
How about this way?
Enable "Toggle Threshold VRULES On":
But I'm not sure whether this option will work with cycle plugin..
Enable "Toggle Threshold VRULES On":
But I'm not sure whether this option will work with cycle plugin..
Re: Change graph colour with thold?
Hi'ya,
Thanks for that, that does indeed still work when used with Cycle, however, it's not really 'visual' enough for what we need. I've got to get someone's attention very quickly as soon as a threshold is crossed and really need to trigger a large colour-change or similar. Do you (or anyone else) know of a way to get more of an impact out of a threshold breach?
All the best,
Thanks for that, that does indeed still work when used with Cycle, however, it's not really 'visual' enough for what we need. I've got to get someone's attention very quickly as soon as a threshold is crossed and really need to trigger a large colour-change or similar. Do you (or anyone else) know of a way to get more of an impact out of a threshold breach?
All the best,
Re: Change graph colour with thold?
Hmm... Then, how about like this?
Additional code for 'plugins/thold/setup.php':
// Tested on thold-v0.4.9-3 / Cacti 0.8.7i-PIA-3.1, but not fully verified
Additional code for 'plugins/thold/setup.php':
Code: Select all
function thold_rrd_graph_graph_options ($g) {
...
// If the latest status is not normal, change background color of the graph
$last_stat = db_fetch_cell("SELECT status FROM plugin_thold_log WHERE graph_id = $id ORDER BY time DESC LIMIT 1");
if ($last_stat != ST_RESTORAL && $last_stat != ST_NOTIFYRS) {
$g['graph_opts'] .= '--color BACK#FFAAAA' . RRD_NL;
}
return $g;
}
Who is online
Users browsing this forum: No registered users and 1 guest