Thold 2.x - Thresholding/Alerting module for cacti 8.6
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: baselining overridden by explicit thresholds?
Ok, had a look at the code by myself. As I understand, it seems to go this way:lvm wrote:I'm working with baselining "on" and overriding only low threshold with value 0 (this is: I only want baselining to be in effect for above threshold alerting. As I understood, the precedence however is on the "hard" thresholds ....
But thold still triggers even for "below" values (value is below "baselined low threshold" but above "absolute low threshold")
So I tried to set both High and Low Thresholds. Leaving "Baseline Monitoring" checked, it seems that these absolute thresholds are ignored.
So, do I have to uncheck even if only "Low Threshold" is set?
1. check, whether absolute thresholds are set
2. if set, check each absolute threshold seperately
3. if any of these absolute thresholds is triggered, sent email
4. but if none of these absolute thresholds is met, we go on checking BOTH baseline thresholds, if baselining is set
In this case, an unmet low absolute threshold will be followed by a baseline test that may even trigger a "low threshold underrun". Changing this would require a patch for both check-thold.php and thold-functions.php.
If there is demand for such a patch, I would supply one.
Reinhard
Threshold Patches
Here are a few patches for something that was annoying me today.
1. When you add a threshold for a Data Source that has multiple Data Source Items, if you add the threshold to any Data Source Item except the first one, the HOSTID is not properly passed on and placed into the database resulting in it using the default which is 0.
2. The sorting of the threshold tables and listbox is hard to read since there isn't much of a logical order besides the alerting at the top. These patches also set the threshold tables and listboxes to sort by alerting and then the hosts description, which makes everything nice and pretty yet still puts all the alerts up top.
Let me know if you have any questions about these. Hopefully I will get around to posting alot more patches today.
1. When you add a threshold for a Data Source that has multiple Data Source Items, if you add the threshold to any Data Source Item except the first one, the HOSTID is not properly passed on and placed into the database resulting in it using the default which is 0.
2. The sorting of the threshold tables and listbox is hard to read since there isn't much of a logical order besides the alerting at the top. These patches also set the threshold tables and listboxes to sort by alerting and then the hosts description, which makes everything nice and pretty yet still puts all the alerts up top.
Let me know if you have any questions about these. Hopefully I will get around to posting alot more patches today.
- Attachments
-
- thold-sorting.zip
- Patches to the Threshold Sorting
- (2.34 KiB) Downloaded 257 times
Threshold Patches for Orphaned Thresholds
Here are a few patches for when a data source is deleted. The threshold would exist, and when viewing any page that displayed the thresholds, you would receive multiple errors. This solves this by not letting it error, and instead displaying "Unknown Data Source" as the Data Source Name.
Ideally, when you delete a datasource, the threshold should be deleted along withit, and if someone would like, I can create a patch for that also.
Ideally, when you delete a datasource, the threshold should be deleted along withit, and if someone would like, I can create a patch for that also.
- Attachments
-
- Thold - Orphaned.zip
- Patch for Orphaned Thresholds
- (2.17 KiB) Downloaded 228 times
Patch for RRD Sorting issue in Thresholds
This patch fixes an RRD sorting issue that I have seen crop up in a few places. This only occurs when items are inserted into data_template_rrd but the ID is not internally sorted correctly (its very strange, but it seems to happen to at least half my hosts, possibly when certain datasources are created and then deleted again). This completely stopped the auto creation of thresholds, and the graph in the thresholds editting window from working on certain hosts. (I can elaborate more if needed)
To fix this, the only thing that is required is to "sort by id" on the 2 select statements.
To fix this, the only thing that is required is to "sort by id" on the 2 select statements.
- Attachments
-
- thold-rrd-sorting.zip
- Patch for RRD Sorting issue in Thresholds
- (1.06 KiB) Downloaded 239 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
cigamit,
thank you for your work. But I really got some problems with these patches. What is the sequence for them? I recognized from the diff files, that there are some release number e.g. r1.2, r1.3, r1.4 and so on. So may you add a hint for the correct sequence?
By the way ... is there a more useful way to contribute extensions or patches? If other people will extend this thold feature, I suppose we soon will be lost in all those patches.
Just tried to add the "filter" feature and check boxes for "multiple delete" the way like data_sources.php ... but it seems to be a greater work for unexperienced php coders as me ...
Reinhard
thank you for your work. But I really got some problems with these patches. What is the sequence for them? I recognized from the diff files, that there are some release number e.g. r1.2, r1.3, r1.4 and so on. So may you add a hint for the correct sequence?
By the way ... is there a more useful way to contribute extensions or patches? If other people will extend this thold feature, I suppose we soon will be lost in all those patches.
Just tried to add the "filter" feature and check boxes for "multiple delete" the way like data_sources.php ... but it seems to be a greater work for unexperienced php coders as me ...
Reinhard
The reason they are posted as patches is for TheWitness to integrate them into the next version if he wishes. There is no actual sequence to the patches, they should work no matter which order you integrate them into the codebase with (you may get fuzz warnings, but that is normal).lvm wrote:cigamit,
thank you for your work. But I really got some problems with these patches. What is the sequence for them? I recognized from the diff files, that there are some release number e.g. r1.2, r1.3, r1.4 and so on. So may you add a hint for the correct sequence?
By the way ... is there a more useful way to contribute extensions or patches? If other people will extend this thold feature, I suppose we soon will be lost in all those patches.
Just tried to add the "filter" feature and check boxes for "multiple delete" the way like data_sources.php ... but it seems to be a greater work for unexperienced php coders as me ...
Reinhard
The version numbers at the top are just the revisions of that file within my own CVS Resposistory, you could I get use that for sequencing, but otherwise I would just ignore it.
I have plenty more to submit, I just have to take the time to export them from my CVS.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
The next release have changed so much that I don't think these patches will apply. I'm refering to 0.9, btw.
[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 I'm getting this problem while doing auto-create treshold, any idea how to resolve this?
Warning: main(c:\Inetpub\wwwroot\cacti\lib/thold-functions.php) [function.main]: failed to open stream: No such file or directory in c:\Inetpub\wwwroot\cacti\thold.php on line 19
Warning: main() [function.include]: Failed opening 'c:\Inetpub\wwwroot\cacti\lib/thold-functions.php' for inclusion (include_path='.;C:\php5\pear') in c:\Inetpub\wwwroot\cacti\thold.php on line 19
Fatal error: Call to undefined function autocreate() in c:\Inetpub\wwwroot\cacti\thold.php on line 41
Thanks,
R2D2
Warning: main(c:\Inetpub\wwwroot\cacti\lib/thold-functions.php) [function.main]: failed to open stream: No such file or directory in c:\Inetpub\wwwroot\cacti\thold.php on line 19
Warning: main() [function.include]: Failed opening 'c:\Inetpub\wwwroot\cacti\lib/thold-functions.php' for inclusion (include_path='.;C:\php5\pear') in c:\Inetpub\wwwroot\cacti\thold.php on line 19
Fatal error: Call to undefined function autocreate() in c:\Inetpub\wwwroot\cacti\thold.php on line 41
Thanks,
R2D2
Need your BIG HELP guys, just managed to turn TRESHOLD up and running but after rebooting my server I can't get in to MRTG page and I'm getting this instead.
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Fatal error: Call to undefined function cacti_log() in c:\Inetpub\wwwroot\cacti\lib\database.php on line 51
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mrtg01' (10061) in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
Fatal error: Call to undefined function cacti_log() in c:\Inetpub\wwwroot\cacti\lib\database.php on line 51
-
- Posts: 4
- Joined: Sun May 15, 2005 6:26 pm
-
- Posts: 4
- Joined: Sun May 15, 2005 6:26 pm
The patch submitted doesn't work well with the threshold module, since the patch is strictly against cacti v0.8.6d without thold installed. I will shortly be releasing another patch to use after you install thold, so all should be well.theuruguayan wrote:Perhaps is my setup, when i install thold the monitoring link in the tab disappear.
The monitoring window is built for viewing on a 1024x768 view, but I do hope at some point to put in a user definable option for the number of hosts in a row (its currently 10).
The audible alarm works perfect in IE, but in Firefox (using Quicktime to play the wav) when the alarm goes off, quicktime will not let the page auto-refresh, but I would clauk that up to a quicktime / firefox problem more than anything else.
I should probably move all this to its own thread since the monitoring part of it hasn't much to do with the thold module (the rest does though).
-
- Posts: 4
- Joined: Sun May 15, 2005 6:26 pm
cigamit, thanks for the answer, i manage to add the monitor script to the menu for the moment, and disable the autentification so i could login.
Because when i install thold it got ride of the allow configuration for a user, so for the moment i disable it, and change the folder it was hosted just in case.
Monitor scripts looks realy nice, amazing work. I edited by hand the file and put 5 and works perfect. In firefoxs it looks really weird with 10.
Because when i install thold it got ride of the allow configuration for a user, so for the moment i disable it, and change the folder it was hosted just in case.
Monitor scripts looks realy nice, amazing work. I edited by hand the file and put 5 and works perfect. In firefoxs it looks really weird with 10.
So, is there anywhere I could grab a CVS copy of the thold module? I was led to believe that it would be integrated into the next cacti, but have not seen it go through CVS yet.rony wrote:The next release have changed so much that I don't think these patches will apply. I'm refering to 0.9, btw.
As far as Cacti, I currently run seperate boxes with v0.8.6c (for production), v0.8.6d (will be prod), and the latest CVS installed (for testing / developing). I really wish you all had a CVS Mailing List so I could keep up with changes that come through!. I so really like how the CVS is shaping up and have been tracking down a small bug in it for the last day or so. For certain default graphs its not passing the data source fields to rrdtool, so that its throwing an error instead of updating. (Local processes, local users)
Code: Select all
2005-05-15 21:32:28 - DEBUG: POLLER: CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacticvs/rra/localhost_users_1.rrd --template 1115865147:0
ERROR: Not enough arguments
Who is online
Users browsing this forum: No registered users and 0 guests