Thold 2.x - Thresholding/Alerting module for cacti 8.6

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Locked
[asm]
Posts: 21
Joined: Sun Apr 03, 2005 5:36 pm

Post by [asm] »

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!!!!
Attachments
thold_086e-rc19.patch
(5.17 KiB) Downloaded 460 times
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

Post by mlist »

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 :)
[asm]
Posts: 21
Joined: Sun Apr 03, 2005 5:36 pm

Post by [asm] »

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
mijo
Posts: 4
Joined: Sat Jun 18, 2005 5:46 am
Contact:

Thold 2.1a: weekend exemption and saturdays :-)

Post by mijo »

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]
mijo
Posts: 4
Joined: Sat Jun 18, 2005 5:46 am
Contact:

Current Value

Post by mijo »

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?
mijo
Posts: 4
Joined: Sat Jun 18, 2005 5:46 am
Contact:

request for new feature?

Post by mijo »

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?
d0ors
Posts: 10
Joined: Sat May 21, 2005 8:34 am

Re: Problems with IIS

Post by d0ors »

[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
BrettS
Posts: 24
Joined: Tue Feb 15, 2005 8:49 pm

thold syslog errors

Post by BrettS »

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
patcharat2000
Posts: 2
Joined: Wed May 25, 2005 3:31 am

Thold can't show number more than integer

Post by patcharat2000 »

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
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

template for hd% usage

Post by mlist »

Can you send the templates and script for the HD% usage?

thanks
daemon
Cacti User
Posts: 61
Joined: Tue Jun 21, 2005 12:16 pm

Post by daemon »

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?
ChupaMe
Posts: 9
Joined: Sat Jun 25, 2005 6:40 am

too high values for traffic graph

Post by ChupaMe »

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?
Attachments
cacti.JPG
cacti.JPG (37.92 KiB) Viewed 9075 times
a2line59
Posts: 45
Joined: Mon May 23, 2005 8:20 am
Location: France

Post by a2line59 »

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
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

a2line59,

I had the same problem.

Solution for me was to create a new user with permission to see the thresholds tab.

Seems that there is a bug with graph permissions and thold which only occurs with with existing cactiusers.

Hope this helps for u :wink:
kiw0r
Posts: 18
Joined: Fri Jun 17, 2005 4:26 am

Website or repository for Thold ?

Post by kiw0r »

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
Locked

Who is online

Users browsing this forum: No registered users and 1 guest