Thold 2.x - Thresholding/Alerting module for cacti 8.6
Moderators: Developers, Moderators
Here is the patch I've made for cactid 0.8.6e-rc19...
You must furst use dos2unix program to remove '\r' from all files!!!!
You must furst use dos2unix program to remove '\r' from all files!!!!
- Attachments
-
- thold_086e-rc19.patch
- (5.17 KiB) Downloaded 460 times
Hi asm
Sorry for my stupid question, please be patience..... can you explain how to apply the patch?
I suppose I must copy your file in /var/www/html/cacti/thold patch and execute some comman like "patch -p1 -N......"
Moreover....I have cacti 0.8.6d+thold 2.1a + thold patch.
Does this patch work with my cacti release also?
Thanks
Sorry for my stupid question, please be patience..... can you explain how to apply the patch?
I suppose I must copy your file in /var/www/html/cacti/thold patch and execute some comman like "patch -p1 -N......"
Moreover....I have cacti 0.8.6d+thold 2.1a + thold patch.
Does this patch work with my cacti release also?
Thanks
OK... get cactiD from here: http://forums.cacti.net/viewtopic.php?t=8036
unzip the file
use 'dos2unix *' in command line
apply patch with 'patch -p1 < thold_086e-rc19.patch'
use './bootstrap'
use './configure'
use 'make'
This must be all
unzip the file
use 'dos2unix *' in command line
apply patch with 'patch -p1 < thold_086e-rc19.patch'
use './bootstrap'
use './configure'
use 'make'
This must be all
Thold 2.1a: weekend exemption and saturdays :-)
JFI: found two brackets missing in check-thold.php - about line 72 :
wrong:
[code]
if ($weekday == "Saturday" || $weekday == "Sunday" && $alert_exempt == "on")
{
exit("weekend exemption is on");
}
[/code]
right:
[code]if (($weekday == "Saturday" || $weekday == "Sunday") && $alert_exempt == "on") \
{
exit("weekend exemption is on");
}
[/code]
wrong:
[code]
if ($weekday == "Saturday" || $weekday == "Sunday" && $alert_exempt == "on")
{
exit("weekend exemption is on");
}
[/code]
right:
[code]if (($weekday == "Saturday" || $weekday == "Sunday") && $alert_exempt == "on") \
{
exit("weekend exemption is on");
}
[/code]
Current Value
hmm... the frontend shows always a current value of "0" and I got some annoying PHP-notices ("Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cacti/lib/thold-functions.php on line 36
") .
So I changed function "get_current" (in lib/thold_funtions.php line 36ff) to use not the current but the last time-interval:
old
[code]
function get_current_value($rra, $ds)
{
global $config;
$last_time_entry = rrd_last($rra, "MAX");
$last_needed = $last_time_entry + 900;
$result = rrdtool_function_fetch($rra, $last_time_entry, $last_needed);
$idx = array_search($ds, $result["data_source_names"]);
return round($result["values"][$idx][0]);
}
[/code]
new:
[code]
function get_current_value($rra, $ds)
{
global $config;
$last_time_entry = rrd_last($rra, "MAX");
// use one timeframe in the past
$last_time_entry=$last_time_entry - 900;
$last_needed = $last_time_entry + 900;
$result = rrdtool_function_fetch($rra, $last_time_entry, $last_needed);
$idx = array_search($ds, $result["data_source_names"]);
return round($result["values"][$idx][0]);
}
[/code]
does this make sense?
") .
So I changed function "get_current" (in lib/thold_funtions.php line 36ff) to use not the current but the last time-interval:
old
[code]
function get_current_value($rra, $ds)
{
global $config;
$last_time_entry = rrd_last($rra, "MAX");
$last_needed = $last_time_entry + 900;
$result = rrdtool_function_fetch($rra, $last_time_entry, $last_needed);
$idx = array_search($ds, $result["data_source_names"]);
return round($result["values"][$idx][0]);
}
[/code]
new:
[code]
function get_current_value($rra, $ds)
{
global $config;
$last_time_entry = rrd_last($rra, "MAX");
// use one timeframe in the past
$last_time_entry=$last_time_entry - 900;
$last_needed = $last_time_entry + 900;
$result = rrdtool_function_fetch($rra, $last_time_entry, $last_needed);
$idx = array_search($ds, $result["data_source_names"]);
return round($result["values"][$idx][0]);
}
[/code]
does this make sense?
request for new feature?
After getting alerts, I would like to configure the thresholds globaly for a graph template or a data-input-query. Have I missed a feature or is anybody working on it?
Re: Problems with IIS
[quote="benhanson"]Just since the move to 2.1a, I'm seeing an issue with IIS where trying to load the data_source page causes the www service to freeze up. Address bar shows http://hostname/cacti/thold.php?rra=31&hostid=4, and from this point on I get no response from the web server. Stopping and starting the WWW service clears it up, though I have to kill inetinfo.exe, the service won't shutdown gracefully. I'm going to downgrade and see if something else is up. Nothing is being logged to thold.log either. WWW logs show data_sources.php then 2 gifs as the last things loaded. Any ideas?[/quote]
Is there a solution to this ?
Thanks
Is there a solution to this ?
Thanks
thold syslog errors
Hi, I may be wron so Id like to appologize first if I am.
When using thold with syslog Im finding that the syslog error is always "restored to normal" reguardless of the actual result. Using email I get emails for both "went above threshold" and resotred to normal. the corresponding syslog result for each test is always "restored to normal"
Can anyone assist please??
thanks
Brett Stevens
When using thold with syslog Im finding that the syslog error is always "restored to normal" reguardless of the actual result. Using email I get emails for both "went above threshold" and resotred to normal. the corresponding syslog result for each test is always "restored to normal"
Can anyone assist please??
thanks
Brett Stevens
-
- Posts: 2
- Joined: Wed May 25, 2005 3:31 am
Thold can't show number more than integer
You are not the only one who sends warnings for HD, I do believe that the particular problem you have is because of the column in thold_data
Code:
thold_hi int(50)
changing this to something like
Code:
thold_hi varchar(100)
should do the trick.
I personally do not have this problem, as I have rewritten the templates and script to also return the HD% as a data source (and to not return floppies, cd-roms, ect...), which allows me to set a threshold on the % of used space. So whenever we hit 90%, it alerts me no matter what size the drive is.
-------------------------------------------------------------------------------------
I change thold_data follow this massage. But i can't set alert thold > 2147483647. I must do more something. Thk You
Code:
thold_hi int(50)
changing this to something like
Code:
thold_hi varchar(100)
should do the trick.
I personally do not have this problem, as I have rewritten the templates and script to also return the HD% as a data source (and to not return floppies, cd-roms, ect...), which allows me to set a threshold on the % of used space. So whenever we hit 90%, it alerts me no matter what size the drive is.
-------------------------------------------------------------------------------------
I change thold_data follow this massage. But i can't set alert thold > 2147483647. I must do more something. Thk You
template for hd% usage
Can you send the templates and script for the HD% usage?
thanks
thanks
first, let me say that thold is awesome. there is one issue I'm hoping someone can help with. if I create thresholds for a data source, and then delete that data source, I get all sorts of errors when I bring up the thresholds page in cacti. I know I can go through and delete these manually by clicking on the threshold ID number in cacti, but I was hoping there was an easier way to do it. I've done it in the database by running the command delete from thold_data where id=THRESHOLD_ID;, but I was wondering if there was an easy way to get a list of offending thresholds so I could script it. I've looked at thold_data to find some difference in any of the fields between a good and a bad threshold but can't find any field to key off of.
anyone?
anyone?
too high values for traffic graph
i have a strange problem with thold. it shows me too high values for traffic graphs. all other things are working(cpu, hdd used etc.)
See the attached screenshot. I think the Current value should be something like 1800000
What can i do?
See the attached screenshot. I think the Current value should be something like 1800000
What can i do?
- Attachments
-
- cacti.JPG (37.92 KiB) Viewed 9081 times
i have a problem with a user
i configure a guest user to see graphs and thresholds
for that, i gived to this user permissions to wiew graph and view threshold
when i try this user, i can access to graphs but not to thresholds
when i choose a threshold i have login page
i don't understand why ? if someone have a idea ...
thanks
i configure a guest user to see graphs and thresholds
for that, i gived to this user permissions to wiew graph and view threshold
when i try this user, i can access to graphs but not to thresholds
when i choose a threshold i have login page
i don't understand why ? if someone have a idea ...
thanks
Website or repository for Thold ?
Hum... Is there any place (instead of the forum) to find the Thold patch ?
It is really a pain to look at this to update Cacti ...
Can this be added on Cacti main tree ?
Really I love thold, but upgrading it with cacti is pain in the ass, trust me...
/Xavier
It is really a pain to look at this to update Cacti ...
Can this be added on Cacti main tree ?
Really I love thold, but upgrading it with cacti is pain in the ass, trust me...
/Xavier
Who is online
Users browsing this forum: No registered users and 0 guests