Thold precentage limits patch
Moderators: Developers, Moderators
Thold precentage limits patch
hello verybody,
thold_prec_eval.diff allows to set precentage tresholds
(for example instead of digit value in upper limit field in thold template you can now enter 90%). Percent values are counted considering graph scale.
patch must be applied to check-thold.php.
thold_autocreate.diff must be applied to host.php - it allows to create tresholds for all currently listed devices. In device section below "Add" new operation will apear - "Treshold listed devices".
both patches tested and working
thold_prec_eval.diff allows to set precentage tresholds
(for example instead of digit value in upper limit field in thold template you can now enter 90%). Percent values are counted considering graph scale.
patch must be applied to check-thold.php.
thold_autocreate.diff must be applied to host.php - it allows to create tresholds for all currently listed devices. In device section below "Add" new operation will apear - "Treshold listed devices".
both patches tested and working
- Attachments
-
- thold_prec_eval.diff.txt
- (1.73 KiB) Downloaded 470 times
-
- thold_autocreate.diff.txt
- (1.55 KiB) Downloaded 533 times
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Let Cigamit know about this.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Hi,
which version of cacti/thold is the patch created against?
I've tried the patches, but it seems the percentage hi/low thold values "rounded" and stored without the '%' char before inserted in DB (thold-functions.php) during the threshold creation.
I am testing using cacti 0.8.6h and thold 0.2.9
Regards.
which version of cacti/thold is the patch created against?
I've tried the patches, but it seems the percentage hi/low thold values "rounded" and stored without the '%' char before inserted in DB (thold-functions.php) during the threshold creation.
I am testing using cacti 0.8.6h and thold 0.2.9
Regards.
Have you working whith this?cigamit wrote:I will let you know when I get the time to add the new hook the plugin architecture. At that time, I will also add this to the thold plugin.
I've been fairly busy lately, so don't expect it very quickly. I need to finish up the Event Manager code I have been workin on first.
Is this feature in 0.3 THold plugin?
Thanks
Ok, here's the problem:
from thold 0.2.8 release input values are rounded up to four decimal places:
this operation removes % sign which you do enter. in order precentage evaluation to work properly, this restriction has to be removed in all instances of thold-functions.php:
similar problem exists in thold_templates.php where input values are checked against their numeric values.
download an attached patch and follow instructions.txt
if you fail to use precentage evaluation anyway - try to run check-thold.php manualy
# php check-thold.php
and post output here.
ps: thold_autocreate.diff.txt is not included in this patch
ps2: i'm encountering a notice in devices section "undefined index: hosts_status", but this doesn't seems to prevent Treshold listed devices Create function
from thold 0.2.8 release input values are rounded up to four decimal places:
Code: Select all
$sql .= ", " . (trim($_POST["thold_hi"]) == "" ? "NULL" : ("'" . round($_POST["thold_hi"],4) . "'"));
$sql .= ", " . (trim($_POST["thold_low"]) == "" ? "NULL" : ("'" . round($_POST["thold_low"],4) . "'"));
Code: Select all
$sql .= ", " . (trim($_POST["thold_hi"]) == "" ? "NULL" : ("'" . $_POST["thold_hi"] . "'"));
$sql .= ", " . (trim($_POST["thold_low"]) == "" ? "NULL" : ("'" . $_POST["thold_low"] . "'"));
download an attached patch and follow instructions.txt
if you fail to use precentage evaluation anyway - try to run check-thold.php manualy
# php check-thold.php
and post output here.
ps: thold_autocreate.diff.txt is not included in this patch
ps2: i'm encountering a notice in devices section "undefined index: hosts_status", but this doesn't seems to prevent Treshold listed devices Create function
- Attachments
-
- thold_prec_eval.tar.gz
- updated version. tested on cacti 0.8.6h + thold 0.3.0
updated verbose output - (14.05 KiB) Downloaded 400 times
Last edited by johnrembo on Thu Aug 31, 2006 2:43 am, edited 1 time in total.
no it isn't...
i've updated my previous post (in order not to confuse people). download the patch once again and try. In your case apply only thold_templates.diff.
I'm doing four programming tasks parallely , so sorry for mistakes - I totally have no time for detailed debugging and appreciate your help.
i've updated my previous post (in order not to confuse people). download the patch once again and try. In your case apply only thold_templates.diff.
I'm doing four programming tasks parallely , so sorry for mistakes - I totally have no time for detailed debugging and appreciate your help.
Who is online
Users browsing this forum: No registered users and 0 guests