Thold 2.x - Thresholding/Alerting module for cacti 8.6
Moderators: Developers, Moderators
very great addon ..
.. we remplace argus+bb with cacti + thold.
but, what about escalading !?
i'v modified a little bit you'r last check_thold.php to permit
me using thold_fail_count & thold_fail_ack (new field) to escalade.
do you have any plan in this way ?
BTW, thanks a lot, with small code you make big smile here
but, what about escalading !?
i'v modified a little bit you'r last check_thold.php to permit
me using thold_fail_count & thold_fail_ack (new field) to escalade.
do you have any plan in this way ?
BTW, thanks a lot, with small code you make big smile here
--
t0mm
t0mm
Thold on 0.8.6d
I installed Thold on Cacti 0.8.6d.
So far no problems. everything is working.
So far no problems. everything is working.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Cacti 0.8.6d is a maintenance release. There are primcipally only bug fixes, spike prevention (now with cactid, look under announcements) and rrdtool 1.2.x support. Therefore, THold should continue to work fine.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Thold locking web browser
Hi guys
I have had THOLD installed and working recently, but I only used it on one rrd as a test and then left it for a while. I've now come to add a number of threshholds and after adding 4 everytime I now click on a template hyperlink to create a new threshhold the whole session hangs(requires closing the browser).
I've deleted all the thresholds I created and tried again, but I cant create a single threshhold now as the browser crashes. Nte: I can click on the threshholds hyperlink, and that displays fine, but I cant reach the section to create threshholds.
In my php error log I seem to be getting this reported
[06-May-2005 07:50:40] PHP Notice: Undefined offset: 0 in d:\inetpub\wwwroot\cacti\thold.php on line 46
It seems bizarre, I've no idea how or why it should suddenly start crashing.
Any suggestions welcome.
Kind Regards
Rossco
I have had THOLD installed and working recently, but I only used it on one rrd as a test and then left it for a while. I've now come to add a number of threshholds and after adding 4 everytime I now click on a template hyperlink to create a new threshhold the whole session hangs(requires closing the browser).
I've deleted all the thresholds I created and tried again, but I cant create a single threshhold now as the browser crashes. Nte: I can click on the threshholds hyperlink, and that displays fine, but I cant reach the section to create threshholds.
In my php error log I seem to be getting this reported
[06-May-2005 07:50:40] PHP Notice: Undefined offset: 0 in d:\inetpub\wwwroot\cacti\thold.php on line 46
It seems bizarre, I've no idea how or why it should suddenly start crashing.
Any suggestions welcome.
Kind Regards
Rossco
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Got a similar problem. Solved it by moving the code for the "maill" procedure in util.c from the bottom of the file just before the first procedure "read_config_options".TFC wrote:....[root@cacti-test cacti-cactid-0.8.6c]# make install
source='util.c' object='util.o' libtool=no \
depfile='.deps/util.Po' tmpdepfile='.deps/util.TPo' \
depmode=gcc3 /bin/sh ./config/depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/mysql/include/mysql -g -O2 -c `test -f 'util.c' || echo './'`util.c
util.c error: conflicting types for 'mail'
util.c error: previous implicit declaration of 'mail' was here
util.c2: warning: no newline at end of file
make: *** [util.o] Error 1
I'm not that good in C, but it seems, that "mail" was used before it was defined.
HTH
Reinhard
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Thold locking web browser
Got the same problem with freshly installed thold 2.1Rossco wrote:In my php error log I seem to be getting this reported
[06-May-2005 07:50:40] PHP Notice: Undefined offset: 0 in d:\inetpub\wwwroot\cacti\thold.php on line 46
Using cacti 0.8.6d with cactid and rrdtooll 1.2.1
To my understanding, this seems to be the problem of new rrdtool. Here's an example, first with rrdtool 1.0.49 (working)
Code: Select all
[root@gandalf lib]# /usr/local/rrdtool-1.0.49/bin/rrdtool last /var/www/html/cacti/rra/gandalf_cpu_nice_8.rrd 1115387702
[root@gandalf lib]# /usr/local/rrdtool-1.0.49/bin/rrdtool fetch /var/www/html/cacti/rra/gandalf_cpu_nice_8.rrd AVERAGE -s 1115387702 -e 1115388602
timestamp cpu_nice
1115387700: 1.7337379107e-01
1115388000: nan
1115388300: nan
1115388600: nan
1115388900: nan
Now the same procedure with rrdtool 1.2.1:
Code: Select all
[root@gandalf lib]# /usr/local/rrdtool-1.2.1/bin/rrdtool last /var/www/html/cacti/rra/gandalf_cpu_nice_8.rrd 1115387702
[root@gandalf lib]# /usr/local/rrdtool-1.2.1/bin/rrdtool fetch /var/www/html/cacti/rra/gandalf_cpu_nice_8.rrd AVERAGE -s 1115387702 -e 1115388602
cpu_nice
1115388000: nan
1115388300: nan
1115388600: nan
1115388900: nan
Code: Select all
$last_time_entry = rrd_last($rra, "MAX");
Code: Select all
$last_time_entry = rrd_last($rra, "MAX")-3;
The difference in rrdtool festch behaviour may as well be relevant for other calls to rrdtool_function_fetch in <path_cacti>/lib/rrd.php.
HTH
Reinhard
Lots of changes to the threshold modules
In case anyone is interested, I have done numerous enhancements to our local copy of the Thresholds module, and if you would like to incorporate the code back I'll post them (There are several patches to different files).
1. The Thresholds tab only shows up if you have permissions to access it.
2. Fixed a few problems with pulling graph associations from graph_templates_item when the associations where not inserted into the database in numerical order (a simple "order by id" resolves it)
3. Setup a table for threshold templates, so that we only auto-create thresholds for things that we want. Allows you to set the HI, Low, trigger, notify, ect... (I still need to write the interface to add/modify them)
4. Fixed a few problems with non-associated thresholds. The datasource had been deleted, but the threshold remained, which throws an error, so I fixed the error and it now displays "Unknown Data Source"
5. Modified the Threshold emailing to now use the Open Source class.phpmailer.php (I did modify it all also to add an extra function), which allows me to specify a totally different SMTP Server (with authenication) than the localhost or to just use sendmail (options are good).
6. Using the class.phpmailer.php, now all graphs are emailed as HTML and have the image embedded into the message, so that you see the actual graph, instead of the current (with the old way, they were genereated on the fly, so if you looked at the email 2 days later, you were not seeing the current data). I am currently working on Custom messages with each threshold, since I would rather I was not paged by our NOC if certain thresholds are breached.
7. I have setup a "Monitor" tab (we use it to replace What's Up Gold), which displays all the Hosts you want to monitor (Simple checkbox on the device to disable monitoring). Up devices are green, Down are red, and Recovering are Blue. It throws an Audiable alert when a host is down, you are able to silence the alert, and it uses a little AI to tell when to re-enable the alert automatically. I took the poller, and cmd.php and ripped out alot of stuff to make a "fast" poller which you can run every minute (if you normally only poll every 5). The fast poller only checks to see if the host is up, and updates the database with the info. The fast poller don't interfer with the normal poller as it runs side by side (its not a replacement) The Monitor window will refresh itself every 30 seconds (so to not miss something)
I am sure there are many many other things that I left out, our local copy if heavily modified to make it simple enough for any new employee to add a host, graphs, and thresholds (we also added a tutorials section using Wink). They only have to put in the hostname, ip, and select a host template and click create. All graphs are auto-checked since our data templates and queries are modified to only pull the info we want (only actual HDs, and only actual NICs that are enabled, and the windows services). And now the correct thresholds for the graphs are auto-created with the correct info by a click of a link.
If you would like the patches, I can pull them out of my local CVS and post them. I have a ton of other changes to Cacti itself, it just may take awhile to go through and assemble all the patches.
While I am at it, I would also like to note that I am a developer on the Squirrelmail Team, and a "Plugins Team Leader", so if you are interested in developing a Plugin system for cacti, I can probably help out in that area.
1. The Thresholds tab only shows up if you have permissions to access it.
2. Fixed a few problems with pulling graph associations from graph_templates_item when the associations where not inserted into the database in numerical order (a simple "order by id" resolves it)
3. Setup a table for threshold templates, so that we only auto-create thresholds for things that we want. Allows you to set the HI, Low, trigger, notify, ect... (I still need to write the interface to add/modify them)
4. Fixed a few problems with non-associated thresholds. The datasource had been deleted, but the threshold remained, which throws an error, so I fixed the error and it now displays "Unknown Data Source"
5. Modified the Threshold emailing to now use the Open Source class.phpmailer.php (I did modify it all also to add an extra function), which allows me to specify a totally different SMTP Server (with authenication) than the localhost or to just use sendmail (options are good).
6. Using the class.phpmailer.php, now all graphs are emailed as HTML and have the image embedded into the message, so that you see the actual graph, instead of the current (with the old way, they were genereated on the fly, so if you looked at the email 2 days later, you were not seeing the current data). I am currently working on Custom messages with each threshold, since I would rather I was not paged by our NOC if certain thresholds are breached.
7. I have setup a "Monitor" tab (we use it to replace What's Up Gold), which displays all the Hosts you want to monitor (Simple checkbox on the device to disable monitoring). Up devices are green, Down are red, and Recovering are Blue. It throws an Audiable alert when a host is down, you are able to silence the alert, and it uses a little AI to tell when to re-enable the alert automatically. I took the poller, and cmd.php and ripped out alot of stuff to make a "fast" poller which you can run every minute (if you normally only poll every 5). The fast poller only checks to see if the host is up, and updates the database with the info. The fast poller don't interfer with the normal poller as it runs side by side (its not a replacement) The Monitor window will refresh itself every 30 seconds (so to not miss something)
I am sure there are many many other things that I left out, our local copy if heavily modified to make it simple enough for any new employee to add a host, graphs, and thresholds (we also added a tutorials section using Wink). They only have to put in the hostname, ip, and select a host template and click create. All graphs are auto-checked since our data templates and queries are modified to only pull the info we want (only actual HDs, and only actual NICs that are enabled, and the windows services). And now the correct thresholds for the graphs are auto-created with the correct info by a click of a link.
If you would like the patches, I can pull them out of my local CVS and post them. I have a ton of other changes to Cacti itself, it just may take awhile to go through and assemble all the patches.
While I am at it, I would also like to note that I am a developer on the Squirrelmail Team, and a "Plugins Team Leader", so if you are interested in developing a Plugin system for cacti, I can probably help out in that area.
- Attachments
-
- Preview of Monitor Tab
- monitoring.jpg (145.26 KiB) Viewed 7985 times
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I must say, makes me tingle!!!
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
anyone got working file?
hi,
anyone got any good working file i can download and try out? if so please post it here so i can try this new plugins out.
thanks
anyone got any good working file i can download and try out? if so please post it here so i can try this new plugins out.
thanks
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
The Fetch command written in rrd.php is still working with rrdtool 1.2.x.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Thold locking web browser
Hi Reinhard
Thanks very much for your comprehensive reply.
Sadly, I have not modified RRDtool at all. I did however try switching between versions and modifying the thold-functions.php you mention, but neither resolves the issue. I have even tried rolling back to a previous SQL database, but that too doesnt work.
I'm now at a loss, the html source on the page only loads so far - it seems to load the left hand menu, and gets most of the way through loading the top, but then stops dead seemingly at the generation of the graph or the creation of the tabs for the data index names. (these only appear on screen when I hit the stop button)
I am on 0.8.6.c on windows 2000 Server, PHP 4.3.9
This is the last section of the html source that loads.
Many thanks
Ross
Thanks very much for your comprehensive reply.
Sadly, I have not modified RRDtool at all. I did however try switching between versions and modifying the thold-functions.php you mention, but neither resolves the issue. I have even tried rolling back to a previous SQL database, but that too doesnt work.
I'm now at a loss, the html source on the page only loads so far - it seems to load the left hand menu, and gets most of the way through loading the top, but then stops dead seemingly at the generation of the graph or the creation of the tabs for the data index names. (these only appear on screen when I hit the stop button)
I am on 0.8.6.c on windows 2000 Server, PHP 4.3.9
This is the last section of the html source that loads.
I'm about to start going through the whole page and add comments to identify where its hanging.
<-----removed---->
<form name="THold" action=thold.php method=post>
<input type='hidden' name='rra' value='11627'>
<input type='hidden' name='hostid' value='309'>
Data Source Description: <br><strong>2600-Reading-Beep - 5 Minute CPU</strong><br><br>
<!-- Threshold: <br><input type='text' name='thold' size='10' maxlength='20' value="" ><br>
-->
Associated Graph (graphs that use this RRD): <br>
<select name='element'>
<option value=11458 selected> 11458 - 2600-Reading-Beep - CPU Usage </option>
</select>
<br>
<br>
</td>
<td>
<img src="graph_image.php?local_graph_id=11458&rra_id=1&graph_start=-32400&graph_height=100&graph_width=300&graph_nolegend=true">
</td>
</tr>
</table>
<table align="center" width="98%" cellpadding=1 cellspacing=0 border=0 bgcolor="#00438C">
<tr>
<td>
<table cellpadding=3 cellspacing=0 border=0 bgcolor="#E1E1E1" width="100%">
Many thanks
Ross
Who is online
Users browsing this forum: No registered users and 0 guests