Thresholding / Alerting Plugin - Official Q/A Thread
Moderators: Developers, Moderators
Did someone found out how to make a threshold in %? E.g. i would like to be notified when disc storage is 90% full.
EDIT: my ugly way to do this: http://forums.cacti.net/viewtopic.php?t=20486
EDIT: my ugly way to do this: http://forums.cacti.net/viewtopic.php?t=20486
Last edited by lordzik on Wed Apr 04, 2007 5:09 am, edited 1 time in total.
Re: Executing a script when a threshold is breached?
Hi,havok1977 wrote:We have been using Cacti and the Thold plugin in our organization for around two years now, and everything works just fine; and now we want to be rid completely of our old MRTG setup.
And the only pending issue is the execution of scripts (mainly for sending snmp traps) when a threshold is breached; from what we know, the only external command that can be executed from thold is to send an email notification; is there anyway we could configure a script execution to go along with that outgoing email? A drop down box with a list of scripts to execute from a certain file system route would be the best solution.
Anyone can let me know where in the thold plugin the email notification takes please so i may code the necessary changes?
Thanks in advance.
Exact same need as you - snmp for alerting - this may be off interest:
http://forums.cacti.net/viewtopic.php?p=96089#96089
HTH
Lard
---- lard007skype ----
Broken graph in email
To complete on a previous post, I have been digging around to understand why my graphs were broken when sent as an email attachment and I finally discovered the reason: the file was somehow truncated. After looking at the code, it looks like the reading of the output of rrdtool in lib/rrd.php was done using the fgets function which is not the right one for binary reads. I switched it to fread and it now works like a charm.
Hope this will help someone. Cheers,
TheFrip
Hope this will help someone. Cheers,
TheFrip
Thold doesn't seem to be 100% working
New to cacti, but seem to be getting the hang of it.
Installed Cacti 0.8.6j with plugin-arch 1.1 and thold 0.3.5.2.
I now have the Alerting/Thold tab in the settings section of the console, but I have no Threshold tab up top, and none of the threshold options seem to be on my graph/new graph pages.
I installed plugin-arch using the patchfiles (cacti-plugin-0.8.6j.diff) and made sure to update files after checking the .rej files.
I see no errors in either my access_log or error_log and there are no errors in my cacti.log.
This is all running on FC7.
Thanks for any help in advance.
Installed Cacti 0.8.6j with plugin-arch 1.1 and thold 0.3.5.2.
I now have the Alerting/Thold tab in the settings section of the console, but I have no Threshold tab up top, and none of the threshold options seem to be on my graph/new graph pages.
I installed plugin-arch using the patchfiles (cacti-plugin-0.8.6j.diff) and made sure to update files after checking the .rej files.
I see no errors in either my access_log or error_log and there are no errors in my cacti.log.
This is all running on FC7.
Thanks for any help in advance.
Thold and killspike
Apear error
Notice: Undefined index: user_admin.php:user_edit in <cacti path>\lib\functions.php on line 1455
when disable killspike its ok.
whose bag ?
Apear error
Notice: Undefined index: user_admin.php:user_edit in <cacti path>\lib\functions.php on line 1455
when disable killspike its ok.
whose bag ?
[size=75]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
and why apear error when i activate thold plugin - then error no longer returns
11/13/2007 10:23:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `user_auth_realm` VALUES (19, 1);'
11/13/2007 10:23:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `user_auth_realm` VALUES (18, 1);'
11/13/2007 10:23:42 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"REPLACE INTO plugin_thold_contacts (user_id, type, data) VALUES (1, 'email', '')'
11/13/2007 10:23:42 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT id FROM plugin_thold_contacts WHERE type = 'email' AND user_id = 1"
11/13/2007 10:23:38 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT data FROM plugin_thold_contacts WHERE user_id = 1 AND type = 'email'"
11/13/2007 10:23:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `user_auth_realm` VALUES (19, 1);'
11/13/2007 10:23:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `user_auth_realm` VALUES (18, 1);'
11/13/2007 10:23:42 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"REPLACE INTO plugin_thold_contacts (user_id, type, data) VALUES (1, 'email', '')'
11/13/2007 10:23:42 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT id FROM plugin_thold_contacts WHERE type = 'email' AND user_id = 1"
11/13/2007 10:23:38 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT data FROM plugin_thold_contacts WHERE user_id = 1 AND type = 'email'"
[size=75]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
i solved one part of problem:dennis00 wrote:Installed... yet... a question... it says: "Data Source Item [traffic_in] - Current value: [38128.5867]".
What does this actually mean? I want to get a mail when my switch (port 24) is doing 30mbit+ for more than 2 hours...
Yet I have no idea how to set up the treshhold and what "38128.5867" means.
OS FreeBSD 6.2
Cacti Version 0.8.7a
Plagin thold-0.3.8
model of swtich: zyxel GS-4012F
i calculate current value of threshold:
(last value of snmpget - earlier value of snmpget)/300(s)=current value of threshold (B/s)
(1345635213 - 452294379)/300=2977802,78 (B/s)
And counter in switch is 32bit (you can see it on picture snmpget.jpg). so when counter have value over 4294967295 its go to 0. And with this case last value of counter will be smaller then previous.
Formula looks like this:
((max posible value of counter - previous value of counter) + last value of counter))/300s=curent value of threshold(B/s)
And when i want to trigger of threshold when total bandwidth of channel over 100 Mb/s i insert value in 12500000 B/s.
For now everything work fine but have problem when threshold starting: - i set up higher trheshold by 12500000 but the first time threshold triggered when load of one of channel where only 128 KB/s.
So continue testing....
- Attachments
-
- i see in cacti log what OID poller get from switch.
- 1.JPG (17.89 KiB) Viewed 13843 times
-
- i run snmpget command to get this OID from switch.
- snmpget.JPG (9.8 KiB) Viewed 13843 times
-
- this is earlier poller request for same OID from swtich
- 2.JPG (16.21 KiB) Viewed 13843 times
-
- and this is current value of threshold after last poller's cheсk
- 3.JPG (7.87 KiB) Viewed 13843 times
I have one problem with thold. i have to monitor about 500 routers. for this i created some threshold templates.
e.g. a template to monitor "Interface Queue Drops".
In this template i use a "Trigger Count" of 1 + a High Treshold of 10.
I want to get a email if the interface had more then 10 Queue Drops per minute!
When i create the threshold with the threshold template cacti receives the first countervalue.
for example the value is 100. because thold has no "LAST VALUE" it seams thold uses 0 by default.
-> CURRENT VALUE (100) - LAST VALUE (0) = 100
the point is: if i create a threshold with trigger count 1 + the datasource is a counter - thold alerts after the first polling.
it would be better if thold waits for 2-3 pollings before it starts to check new thresholds.
sorry for my bad english.
e.g. a template to monitor "Interface Queue Drops".
In this template i use a "Trigger Count" of 1 + a High Treshold of 10.
I want to get a email if the interface had more then 10 Queue Drops per minute!
When i create the threshold with the threshold template cacti receives the first countervalue.
for example the value is 100. because thold has no "LAST VALUE" it seams thold uses 0 by default.
-> CURRENT VALUE (100) - LAST VALUE (0) = 100
the point is: if i create a threshold with trigger count 1 + the datasource is a counter - thold alerts after the first polling.
it would be better if thold waits for 2-3 pollings before it starts to check new thresholds.
sorry for my bad english.
Re: Storing Triggered Thold's for future references
I've set the $debug to 1, is there anything else I have to do so that I can see the CactiTholdLog that's supposed to be created for these threshold messages? Do I need to manually create this file somewhere?cigamit wrote:There is a log file, you just have to turn it on manually in the file. Open check-thold.php and change $debug to 1. You can also log to syslog, if that helps any.r_chetanjain wrote:Hi,
Gr8 plugin....Can we have a facility to store all the triggered Thold's for future references.....
Any ideas.....
Bug report
This is an annoying bug, and probably one that does not affect the running of thold at all; it is probably only cosmetic.
On the thold tab, the last poll displays the correct last time the poller ran.
However, when selecting the Thresholds menu item from the Management section of the left sidebar menu, it does not update on its own. I can only get it to update if I go to the thold tab first, then go to the left menu item. Then the last poll displays fine, or at least it looks like it.
On the thold tab, the last poll displays the correct last time the poller ran.
However, when selecting the Thresholds menu item from the Management section of the left sidebar menu, it does not update on its own. I can only get it to update if I go to the thold tab first, then go to the left menu item. Then the last poll displays fine, or at least it looks like it.
Who is online
Users browsing this forum: No registered users and 0 guests