howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
425 stars 94 forks source link

Multiple errors in the cacti log #67

Closed demokom-gmail-com closed 7 years ago

demokom-gmail-com commented 7 years ago

First, thank you for your great work, Howard. I have installed cacti 1.1.0 and the Weathermap plugin from git branch database-refactor. The map is rendered without errors, the editor also works without complaints. But. Every polling cycle my cacti logis filled with such errors:

2017-03-20 10:31:05 - WEATHERMAP STATS: Weathermap 0.98 run complete - Mon, 20 Mar 17 10:31:05 +0300: 1 maps were run in 0 seconds with 0 warnings. 2017-03-20 10:31:05 - WEATHERMAP [Map 9] office.conf: Wrote map to /var/www/html/cacti/plugins/weathermap/output/0a6c1b86e8693316db11.png and /var/www/html/cacti/plugins/weathermap/output/0a6c1b86e8693316db11.thumb.png 2017-03-20 10:31:05 - WEATHERMAP [Map 9] office.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01] 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 86 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: status_rec_date in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 86 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 85 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: status_fail_date in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 85 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 83 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: availability in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 83 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 82 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: max_time in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 82 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 81 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: min_time in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 81 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 80 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: avg_time in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 80 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 79 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: cur_time in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 79 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 78 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: hostname in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 78 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 76 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: description in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 76 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 75 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined variable: statename in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 75 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 68 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: disabled in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 68 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 64 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: status in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 64 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 60 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: status in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 60 2017-03-20 10:31:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 601 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 weathermap_poller_bottom)(/plugins/weathermap/lib/cacti10-plugin-poller.php: 169 weathermap_run_maps)(/plugins/weathermap/lib/poller-common.php: 220 readData)(/plugins/weathermap/lib/Weathermap.class.php: 1786 readDataFromTargets)(/plugins/weathermap/lib/Weathermap.class.php: 1611 performDataCollection)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 199 collectDataFromTargets)(/plugins/weathermap/lib/WeatherMapDataItem.class.php: 237 readData)(/plugins/weathermap/lib/WMTarget.class.php: 119 ReadData)(/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php: 56 CactiErrorHandler)(/lib/functions.php: 4299 cacti_debug_backtrace) 2017-03-20 10:31:05 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined index: status in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_cactihost.php on line: 56

This is a bit of a concern for me and prevents the launch of cacti 1.x and your plugin in production environment. Can you say something about this? Thanks.

howardjones commented 7 years ago

First of all, I wouldn't use the very latest commit from github in production anyway - that's what releases are for. Sorry!

The cactihost, cactimonitor, thold, dsstats and the poller_output mode of the rrd data source plugins all still need some work to move to the newer PDO database library. I suspect you'll see that your host status on the office.conf map is actually not correct.

This work is the next thing on my list. For all but the rrd one, it should be quick (only one or two db queries and no special cases).

howardjones commented 7 years ago

Closing as a duplicate of #68