not triggering
Moderators: Developers, Moderators
not triggering
have 0.8.8a installed (reinstalled over an older version - sorry don't remember the version; was an ezcacti install that got horribly broken) with thold -v0.4.9-3
In terms of setup there is no error both in the webbrowser nor in the logs (even in debug logging mode)
I can add a threshold both via the datasource manually and through a threshold template with no errors.
I then get a log entry saying " - THOLD: Checking Threshold:'" listing the correct host and graph id.
The problem is that the threshold isn't triggered both with deviation and Hi/Low modes.
Aside from the 1 line indicating that the threshold is being checked - there is no other mention of thold events (even after enabling thold -> syslogging).
Anyone know how I can call this plugin from the commandline so I can troubleshoot?
Thanks
In terms of setup there is no error both in the webbrowser nor in the logs (even in debug logging mode)
I can add a threshold both via the datasource manually and through a threshold template with no errors.
I then get a log entry saying " - THOLD: Checking Threshold:'" listing the correct host and graph id.
The problem is that the threshold isn't triggered both with deviation and Hi/Low modes.
Aside from the 1 line indicating that the threshold is being checked - there is no other mention of thold events (even after enabling thold -> syslogging).
Anyone know how I can call this plugin from the commandline so I can troubleshoot?
Thanks
Re: not triggering
So on a hunch I built a new cacti to test things on, building from scratch, no upgrades and potential problems being brought forward and tholds work fine there.
Here's the differences that are apparent to me:
versions of cacti and thold are identical: Cacti Version 0.8.8a, Thold 0.4.9
Not Working: CentOS release 4.9 (Final)
Working: Debian 6.0.5
Not working: PHP 4.3.9 (cgi) (built: Feb 2 2012 18:53:42)
Working: PHP 5.3.3-7+squeeze9 with Suhosin-Patch (cli) (built: May 8 2012 10:41:34)
Not working: Apache/2.0.52
Working: Apache/2.2.16
I still think the only way I'm going to track this down is to be able to call the thold sctipts from the command line so I can see any hidden error messages.
Here's the differences that are apparent to me:
versions of cacti and thold are identical: Cacti Version 0.8.8a, Thold 0.4.9
Not Working: CentOS release 4.9 (Final)
Working: Debian 6.0.5
Not working: PHP 4.3.9 (cgi) (built: Feb 2 2012 18:53:42)
Working: PHP 5.3.3-7+squeeze9 with Suhosin-Patch (cli) (built: May 8 2012 10:41:34)
Not working: Apache/2.0.52
Working: Apache/2.2.16
I still think the only way I'm going to track this down is to be able to call the thold sctipts from the command line so I can see any hidden error messages.
Re: not triggering
I forgot to mention, I've already tested while "Disable Legacy Notifications" is enabled and not. (obviously setting up the notification lists as needed if legacy is switched off)
Re: not triggering
I am having the same problem.
Our machine was old and we wanted to use the latest versions.
I am using the following versions of software:
apache: v2.0.52
mysql: v4.1.20
PHP: v4.3.9
Cacti: v0.8.8a (Upgraded from Cacti 0.8.7b)
PIA: v3.1
Settings: v0.71
THold: v0.5 (I got it from CactiEZ 0.7)
I don't want to loose the current gathered statistics,
so I did an upgrade with the current machine to the newest Cacti.
After the upgrade I noticed that thresholds never triggered.
I tried many things and finally wanted te debug the PHP.
Then I found out that poller.php was giving an error:
[12-Feb-2013 16:45:12] PHP Fatal error: Call to undefined function: log_cacti_stats() in /var/www/html/poller.php on line 377
log_cacti_stats() is defined in the poller.php and seems for as far as I can understand perfectly in order.
I found out this error by changing the 'error_log =' line in /etc/php.ini to create a log file and created the logfile with permissions for apache.
Then I did 'tail -f /var/log/phperrorlog' to track errors while the poller was running. (/var/log/phperrorlog is the file I entered after error_log in php.ini)
Our machine was old and we wanted to use the latest versions.
I am using the following versions of software:
apache: v2.0.52
mysql: v4.1.20
PHP: v4.3.9
Cacti: v0.8.8a (Upgraded from Cacti 0.8.7b)
PIA: v3.1
Settings: v0.71
THold: v0.5 (I got it from CactiEZ 0.7)
I don't want to loose the current gathered statistics,
so I did an upgrade with the current machine to the newest Cacti.
After the upgrade I noticed that thresholds never triggered.
I tried many things and finally wanted te debug the PHP.
Then I found out that poller.php was giving an error:
[12-Feb-2013 16:45:12] PHP Fatal error: Call to undefined function: log_cacti_stats() in /var/www/html/poller.php on line 377
log_cacti_stats() is defined in the poller.php and seems for as far as I can understand perfectly in order.
I found out this error by changing the 'error_log =' line in /etc/php.ini to create a log file and created the logfile with permissions for apache.
Then I did 'tail -f /var/log/phperrorlog' to track errors while the poller was running. (/var/log/phperrorlog is the file I entered after error_log in php.ini)
Re: not triggering
*fixed*
You hit the nail on the head.
I used the trick you suggested, error_log = in the php.ini, and the same error showed up. This has got to be the single best tip for debugging if setting the internal cacti debug log level setting.
localhost php[30431]: PHP Fatal error: Call to undefined function: log_cacti_stats() in /var/www/html/poller.php on line 377
So all I did to fix the problem is I moved the function log_cacti_stats() to the top of the poller.php script. Actually, I think, it only needs to go above where it's used in the script.
Thresholds working now.
Course now the question is - is this a cacti patch or a thold patch?
You hit the nail on the head.
I used the trick you suggested, error_log = in the php.ini, and the same error showed up. This has got to be the single best tip for debugging if setting the internal cacti debug log level setting.
localhost php[30431]: PHP Fatal error: Call to undefined function: log_cacti_stats() in /var/www/html/poller.php on line 377
So all I did to fix the problem is I moved the function log_cacti_stats() to the top of the poller.php script. Actually, I think, it only needs to go above where it's used in the script.
Thresholds working now.
Course now the question is - is this a cacti patch or a thold patch?
Re: not triggering
Small update. I compared the "fresh install" version - the poller.php file was the same which in theory means that neither should have been working.
I'll post this to bugs and see what the clever guys come up with.
I'll post this to bugs and see what the clever guys come up with.
Re: not triggering
After changing the poller.php like you indicated, I still got errors in the php error log:
PHP Notice: Use of undefined constant DATE_RFC822 - assumed 'DATE_RFC822' in /var/www/html/plugins/thold/thold_functions.php on line 1326
PHP Fatal error: Class weathermapnode: Cannot inherit from undefined class weathermapitem in /var/www/html/plugins/weathermap/WeatherMapNode.class.php on line 9
Cacti and THold seem to work properly, but since errors are reported, something must be wrong.
PHP Notice: Use of undefined constant DATE_RFC822 - assumed 'DATE_RFC822' in /var/www/html/plugins/thold/thold_functions.php on line 1326
PHP Fatal error: Class weathermapnode: Cannot inherit from undefined class weathermapitem in /var/www/html/plugins/weathermap/WeatherMapNode.class.php on line 9
Cacti and THold seem to work properly, but since errors are reported, something must be wrong.
Re: not triggering
I don't have weathermap installed. All that's happened is that moving the function that high up the poller.php script doesn't set the dateformat in time. I posted to bugs.cacti.net so we'll see what the pros say about it. If you want to experiment you could just move the log_cacti_stats function further down the script. Hopefully at some point weathermap will start working again while the thold error doesn't come back... hopefully.
Who is online
Users browsing this forum: No registered users and 0 guests