Thresholds not triggering
Moderators: Developers, Moderators
Thresholds not triggering
I've had cacti running for a while now, but just added thold today. Everything looks great except the thresholds don't seem to trigger. I don't know if I'm missing something here. I've tried setting the threshold to a value it will pass on its own in case it won't trigger if it starts at a value that is higher than the trigger. I've also tried using only high value instead of both high and low.
Attached some screenshots that can hopefully help.
Attached some screenshots that can hopefully help.
Re: Thresholds not triggering
I first upgraded my settings plugin (outdated version was linked here: http://cactiusers.org/downloads/), but that didn't solve it.
I then downgraded my version of thold to 0.4.1, and immediately received alerts after I setup a test threshold.
The only problem now is when individually creating thresholds I can't seem to see as many data sources compared to when I was on a newer version of thold. Creating a template I can see all the same sources though. But some devices I need different settings on. Well, I'm just happy I have thresholds working.
I then downgraded my version of thold to 0.4.1, and immediately received alerts after I setup a test threshold.
The only problem now is when individually creating thresholds I can't seem to see as many data sources compared to when I was on a newer version of thold. Creating a template I can see all the same sources though. But some devices I need different settings on. Well, I'm just happy I have thresholds working.
Re: Thresholds not triggering
Another update:
I just upgraded to PIA 2.9 which I didn't see was a requirement for 0.4.1+ thold until I read the thread "Download for thold 0.4.2" and thold 0.4.4 now triggers thresholds properly.
I would say in hindsight for a new user like me, it would be helpful if the requirements (version numbers included) were laid in in a sticky or maybe in the README in the file.
This is a fantastic tool, and I really appreciate all the work people have put into it.
I just upgraded to PIA 2.9 which I didn't see was a requirement for 0.4.1+ thold until I read the thread "Download for thold 0.4.2" and thold 0.4.4 now triggers thresholds properly.
I would say in hindsight for a new user like me, it would be helpful if the requirements (version numbers included) were laid in in a sticky or maybe in the README in the file.
This is a fantastic tool, and I really appreciate all the work people have put into it.
-
- Posts: 12
- Joined: Sat Jan 08, 2011 4:51 am
Re: Thresholds not triggering
Mine are Cacti 0.8.7g + Thold 0.4.4-41 + PIA 2.9 + Monitor 1.2. I have the same problem with you, Thold is showing the correct value but won't trigger any alarm. perhaps you can share with me how you made thold into work ?GrahamF wrote:Another update:
I just upgraded to PIA 2.9 which I didn't see was a requirement for 0.4.1+ thold until I read the thread "Download for thold 0.4.2" and thold 0.4.4 now triggers thresholds properly.
I would say in hindsight for a new user like me, it would be helpful if the requirements (version numbers included) were laid in in a sticky or maybe in the README in the file.
This is a fantastic tool, and I really appreciate all the work people have put into it.
- Attachments
-
- Screen shot 2011-03-17 at 12.46.02 PM.png (32.83 KiB) Viewed 9150 times
Re: Thresholds not triggering
Thold-0.4.4-41 was working sending me notifications for a week or so, and then stopped even though I didn't change anything. I couldn't get it to start retriggering again unfortunately. What got me going with alerts was downgrading thold to 0.4.3 which I found linked in a thread somewhere.
So working combo for me was:
PIA 2.9
Settings .7
Thold 0.4.3
I also ran the upgrade.php(as I had done for other versions of thold) files in /plugins/thold/extras folder which I don't know if it's necessary or not. I could only find reference to running this after looking in forums for quite a while, it wasn't in any instructions I could readily find.
Good luck!
So working combo for me was:
PIA 2.9
Settings .7
Thold 0.4.3
I also ran the upgrade.php(as I had done for other versions of thold) files in /plugins/thold/extras folder which I don't know if it's necessary or not. I could only find reference to running this after looking in forums for quite a while, it wasn't in any instructions I could readily find.
Good luck!
-
- Posts: 12
- Joined: Sat Jan 08, 2011 4:51 am
Re: Thresholds not triggering
Thanks Graham, I will try it out. From some of the article i read in the forum, they can work it out but from CLEAN INSTALL of Cacti. They too can't find any issue with Thold 0.4.4-41, but it simply won't trigger the alarm.GrahamF wrote:Thold-0.4.4-41 was working sending me notifications for a week or so, and then stopped even though I didn't change anything. I couldn't get it to start retriggering again unfortunately. What got me going with alerts was downgrading thold to 0.4.3 which I found linked in a thread somewhere.
So working combo for me was:
PIA 2.9
Settings .7
Thold 0.4.3
I also ran the upgrade.php(as I had done for other versions of thold) files in /plugins/thold/extras folder which I don't know if it's necessary or not. I could only find reference to running this after looking in forums for quite a while, it wasn't in any instructions I could readily find.
Good luck!
Re: Thresholds not triggering
Also seeing the same thing... after down-grading to 0.4.1 i now get CPU alerts that I wasn't getting with 4.41. My CDEF alerts for % utilization on traffic even started working.
Also, in 4.41 the CPU would go into "notice"... just never into alarm.
I'll try upgrading settings & thodl to 4.4.3 to see what happens.
current working setup :
settings .5
cacti 0.8.7g
thold 0.4.1
pia 2.9
Also, in 4.41 the CPU would go into "notice"... just never into alarm.
I'll try upgrading settings & thodl to 4.4.3 to see what happens.
current working setup :
settings .5
cacti 0.8.7g
thold 0.4.1
pia 2.9
-
- Posts: 12
- Joined: Sat Jan 08, 2011 4:51 am
Re: Thresholds not triggering
Can't make it work either, now i uninstall the Thold plugin and change it with NPC. i create the threshold on the host configuration and now i get email whenever the threshold is breach.dewadragoon wrote:Thanks Graham, I will try it out. From some of the article i read in the forum, they can work it out but from CLEAN INSTALL of Cacti. They too can't find any issue with Thold 0.4.4-41, but it simply won't trigger the alarm.GrahamF wrote:Thold-0.4.4-41 was working sending me notifications for a week or so, and then stopped even though I didn't change anything. I couldn't get it to start retriggering again unfortunately. What got me going with alerts was downgrading thold to 0.4.3 which I found linked in a thread somewhere.
So working combo for me was:
PIA 2.9
Settings .7
Thold 0.4.3
I also ran the upgrade.php(as I had done for other versions of thold) files in /plugins/thold/extras folder which I don't know if it's necessary or not. I could only find reference to running this after looking in forums for quite a while, it wasn't in any instructions I could readily find.
Good luck!
Re: Thresholds not triggering
I too am having the same issue. Pulling my hair out. I tried downgrading back to 4.2 and now that wont trigger alerts...
Anyone figure this out yet?
Settings .7
PIA 2.9
Thold .4.4.41 right now back on .4.2
Anyone figure this out yet?
Settings .7
PIA 2.9
Thold .4.4.41 right now back on .4.2
Re: Thresholds not triggering
Try this:
(1) In 'System Utilities' -> 'Technical Support', check whether if your PHP supports JPEG creation with GD
(3) Re-install PHP, then restart Apache
Since v0.4.3-x and above, thold converts PNG graph into JPEG by using GD functions when sending mail.
GD is bundled in PHP, but not enabled as default when building from source.
http://www.php.net/manual/en/image.installation.php
To determine if this feature worked or not, enable 'error_log=' in php.ini, and search for error like this:
Program was exit abnormally, so subsequent operations (updating database field such as 'thold_fail_count') seems to be not performed..
(1) In 'System Utilities' -> 'Technical Support', check whether if your PHP supports JPEG creation with GD
(2) If not, re-build PHP with configure option such as --with-gd and --with-jpeg-dir[=DIR]gd
---------------------------------
GD Support enabled
...
PNG Support enabled
JPG Support enabled
(3) Re-install PHP, then restart Apache
Since v0.4.3-x and above, thold converts PNG graph into JPEG by using GD functions when sending mail.
GD is bundled in PHP, but not enabled as default when building from source.
http://www.php.net/manual/en/image.installation.php
To determine if this feature worked or not, enable 'error_log=' in php.ini, and search for error like this:
- or -PHP Fatal error: Call to undefined function imagecreatefrompng() in /var/www/cacti/plugins/thold/thold_functions.php on line XXXX
If this function failed, it seems not only failed to send mail.PHP Fatal error: Call to undefined function imagejpeg() in /var/www/cacti/plugins/thold/thold_functions.php on line XXXX
Program was exit abnormally, so subsequent operations (updating database field such as 'thold_fail_count') seems to be not performed..
Re: Thresholds not triggering
I checked mine, and JPG is enabled.
GD Support enabled
...
PNG Support enabled
nothing appears to come up in when logging is turned on either.
GD Support enabled
...
PNG Support enabled
nothing appears to come up in when logging is turned on either.
Re: Thresholds not triggering
>> I checked mine, and JPG is enabled.
For more detailed:
>> nothing appears to come up in when logging is turned on either.
Did you restart Apache when modified php.ini?
Or else, was the PHP error log file (ex. php.log) automatically created?
If not, add permissions:
If threshold is not still triggered, apply this patch (for thold-0.4.4-41, debugging only)
and see what appears in system log (/var/log/syslog or /var/adm/messages or else) on your server.
This patch forces to log debug lines at several step in thold_functions.php. (To apply, perform 'patch < thold_functions.debug.txt' at plugins/thold/ directory)
When threshold is triggered and alerted successfully, such lines are logged:
('patch --reverse < thold_functions.debug.txt')
For more detailed:
Code: Select all
% php -r 'var_dump(gd_info());'
Did you restart Apache when modified php.ini?
Or else, was the PHP error log file (ex. php.log) automatically created?
If not, add permissions:
Code: Select all
# touch php.log
# chmod go+w php.log
and see what appears in system log (/var/log/syslog or /var/adm/messages or else) on your server.
This patch forces to log debug lines at several step in thold_functions.php. (To apply, perform 'patch < thold_functions.debug.txt' at plugins/thold/ directory)
When threshold is triggered and alerted successfully, such lines are logged:
NOTE: Please don't forget to revert changes when no longer needed.Apr 5 10:25:29 <hostname> CactiTholdLog[xxxx]: [ID xxxxx daemon.warning] (DEBUG_1) Localhost - Logged in Users went above threshold of 1 with 2 at trigger 1 out of 0 - (Check High/Low value)
Apr 5 10:25:29 <hostname> CactiTholdLog[xxxx]: [ID xxxxx daemon.warning] (DEBUG_2) Localhost - Logged in Users went above threshold of 1 with 2 at trigger 1 out of 1 - (Breached threshold)
Apr 5 10:25:29 <hostname> CactiTholdLog[xxxx]: [ID xxxxx daemon.warning] (DEBUG_3) Localhost - Logged in Users went above threshold of 1 with 2 at trigger 1 out of 1 - (Alerting is needed)
Apr 5 10:25:29 <hostname> CactiTholdLog[xxxx]: [ID xxxxx daemon.warning] (DEBUG_4) Localhost - Logged in Users went above threshold of 1 with 2 at trigger 1 out of 1 - (Sending mail)
Apr 5 10:25:30 <hostname> CactiTholdLog[xxxx]: [ID xxxxx daemon.warning] (DEBUG_5) Localhost - Logged in Users went above threshold of 1 with 2 at trigger 1 out of 1 - (Mail is sent)
Apr 5 10:25:30 <hostname> CactiTholdLog[xxxx]: [ID xxxxx daemon.warning] (DEBUG_6) Localhost - Logged in Users went above threshold of 1 with 2 at trigger 1 out of 1 - (Update database: 'UPDATE thold_data SET thold_alert=2, thold_fail_count=1 WHERE rra_id=6 AND data_id=XX')
('patch --reverse < thold_functions.debug.txt')
Re: Thresholds not triggering
NOW SOLVED !!!!
I was experiencing the same problem: thresholds not triggering after upgrade of thold to 0.4.3 or 0.4.4.
The problem seemed in the conversion of the graph which has to be sent by email, and was related to PHP, as it is used for converting PNG -> JPG.
To make THOLD trigger working again (and email to be sent) I only made a modification in PHP.INI, adding the red row:
; Directory in which the loadable extensions (modules) reside.
extension_dir ="C:\PHP\ext"
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
extension=php_gd2.dll
Now, my THOLD (0.4.4-41) is triggering again with email sent all right, but the graph is not converted and in the body of the email there is no graph, only an error message.
My php.log file (has to be activated in the php.ini) shows:
[15-Apr-2011 17:28:50] PHP Warning: Missing argument 4 for rrdtool_function_graph(), called in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1504 and defined in C:\Programmi\Apache2\htdocs\cacti\lib\rrd.php on line 523
[15-Apr-2011 17:28:50] PHP Notice: Undefined variable: rrdtool_pipe in C:\Programmi\Apache2\htdocs\cacti\lib\rrd.php on line 545
[15-Apr-2011 17:28:51] PHP Warning: fopen(/tmp/1302881331.png): failed to open stream: No such file or directory in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1697
[15-Apr-2011 17:28:51] PHP Warning: fwrite(): supplied argument is not a valid stream resource in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1698
[15-Apr-2011 17:28:51] PHP Warning: fclose(): supplied argument is not a valid stream resource in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1699
[15-Apr-2011 17:28:51] PHP Warning: imagecreatefrompng(/tmp/1302881331.png): failed to open stream: No such file or directory in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1702
[15-Apr-2011 17:28:51] PHP Notice: Undefined variable: imgname in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1711
[15-Apr-2011 17:28:51] PHP Warning: unlink(/tmp/1302881331.png): No such file or directory in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1721
The problem now is related to graph conversion.
Any idea on how to solve it?
tnx
llull
I was experiencing the same problem: thresholds not triggering after upgrade of thold to 0.4.3 or 0.4.4.
The problem seemed in the conversion of the graph which has to be sent by email, and was related to PHP, as it is used for converting PNG -> JPG.
To make THOLD trigger working again (and email to be sent) I only made a modification in PHP.INI, adding the red row:
; Directory in which the loadable extensions (modules) reside.
extension_dir ="C:\PHP\ext"
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
extension=php_gd2.dll
Now, my THOLD (0.4.4-41) is triggering again with email sent all right, but the graph is not converted and in the body of the email there is no graph, only an error message.
My php.log file (has to be activated in the php.ini) shows:
[15-Apr-2011 17:28:50] PHP Warning: Missing argument 4 for rrdtool_function_graph(), called in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1504 and defined in C:\Programmi\Apache2\htdocs\cacti\lib\rrd.php on line 523
[15-Apr-2011 17:28:50] PHP Notice: Undefined variable: rrdtool_pipe in C:\Programmi\Apache2\htdocs\cacti\lib\rrd.php on line 545
[15-Apr-2011 17:28:51] PHP Warning: fopen(/tmp/1302881331.png): failed to open stream: No such file or directory in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1697
[15-Apr-2011 17:28:51] PHP Warning: fwrite(): supplied argument is not a valid stream resource in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1698
[15-Apr-2011 17:28:51] PHP Warning: fclose(): supplied argument is not a valid stream resource in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1699
[15-Apr-2011 17:28:51] PHP Warning: imagecreatefrompng(/tmp/1302881331.png): failed to open stream: No such file or directory in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1702
[15-Apr-2011 17:28:51] PHP Notice: Undefined variable: imgname in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1711
[15-Apr-2011 17:28:51] PHP Warning: unlink(/tmp/1302881331.png): No such file or directory in C:\Programmi\Apache2\htdocs\cacti\plugins\thold\thold_functions.php on line 1721
The problem now is related to graph conversion.
Any idea on how to solve it?
tnx
llull
Re: Thresholds not triggering
>> NOW SOLVED !!!!
Congratulations.
Case of Windows didn't come to my mind. That's useful information.
Congratulations.
Case of Windows didn't come to my mind. That's useful information.
Re: Thresholds not triggering
I did not have php with gd support installed on my linux setup. I just installed gd but I don't want to test right this moment as I have a working cacti alert setup. When I have some time to test I'll provide an update. I appreciate all the help offered.
Who is online
Users browsing this forum: No registered users and 0 guests