Cacti / plugin_npc

Nagios Plugin for Cacti is a complete UI replacement for Nagios fully integrated into Cacti.
GNU General Public License v3.0
4 stars 3 forks source link

After fix issue with 'Uncaught Error', here is the new issues: CactiErrorHandler #3

Closed zhouleon closed 5 years ago

zhouleon commented 5 years ago

After fix issue with 'Uncaught Error', here is the new issues. Please help to check. thanks!

## 2019.02.07 09:08:13 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcHostsController->getStateInfo(), /plugins/npc/controllers/hosts.php[111]:CactiErrorHandler())
2019.02.07 09:08:13 - ERROR PHP NOTICE in Plugin 'npc': Undefined offset: 0 in file: /usr/share/cacti/site/plugins/npc/controllers/hosts.php on line: 111
2019.02.07 09:08:13 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcHostsController->getStateInfo(), /plugins/npc/controllers/hosts.php[111]:CactiErrorHandler())
2019.02.07 09:08:13 - ERROR PHP NOTICE in Plugin 'npc': Undefined offset: 0 in file: /usr/share/cacti/site/plugins/npc/controllers/hosts.php on line: 111
2019.02.07 09:08:13 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcHostsController->getStateInfo(), /plugins/npc/controllers/hosts.php[111]:NpcHostsController->formatStateInfo(), /plugins/npc/controllers/hosts.php[306]:CactiErrorHandler())
2019.02.07 09:08:13 - ERROR PHP NOTICE in Plugin 'npc': Undefined index: in file: /usr/share/cacti/site/plugins/npc/controllers/hosts.php on line: 306
2019.02.07 09:08:13 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcHostsController->getStateInfo(), /plugins/npc/controllers/hosts.php[111]:CactiErrorHandler())
2019.02.07 09:08:13 - ERROR PHP NOTICE in Plugin 'npc': Undefined offset: 0 in file: /usr/share/cacti/site/plugins/npc/controllers/hosts.php on line: 111
2019.02.07 09:08:07 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcNagiosController->getProgramStatus(), /plugins/npc/controllers/nagios.php[42]:NpcNagiosController->processInfo(), /plugins/npc/controllers/nagios.php[109]:CactiErrorHandler())
2019.02.07 09:08:07 - ERROR PHP NOTICE in Plugin 'npc': Undefined offset: 0 in file: /usr/share/cacti/site/plugins/npc/controllers/nagios.php on line: 109
2019.02.07 09:08:07 - CMDPHP PHP ERROR Backtrace: (/plugins/npc/npc.php[83]:NpcHostgroupsController->getHostgroupServiceStatus(), /plugins/npc/controllers/hostgroups.php[119]:NpcHostgroupsController->getHostgroupMemberServiceStatus(), /plugins/npc/controllers/hostgroups.php[271]:CactiErrorHandler())
2019.02.07 09:08:07 - ERROR PHP DEPRECATED in Plugin 'npc': Non-static method NpcServicesController::getServiceStatesByHost() should not be called statically in file: /usr/share/cacti/site/plugins/npc/controllers/hostgroups.php on line: 271
2019.02.07 09:07:58 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/npc/npc.php[83]:NpcServicegroupsController->getOverview(), /plugins/npc/controllers/servicegroups.php[206]:CactiErrorHandler())
2019.02.07 09:07:58 - ERROR PHP WARNING in Plugin 'npc': Invalid argument supplied for foreach() in file: /usr/share/cacti/site/plugins/npc/controllers/servicegroups.php on line: 206
2019.02.07 09:07:58 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcServicegroupsController->getOverview(), /plugins/npc/controllers/servicegroups.php[206]:CactiErrorHandler())
2019.02.07 09:07:58 - ERROR PHP NOTICE in Plugin 'npc': Undefined variable: temp in file: /usr/share/cacti/site/plugins/npc/controllers/servicegroups.php on line: 206
2019.02.07 09:07:50 - CMDPHP PHP ERROR Backtrace: (/plugins/npc/npc.php[83]:NpcHostgroupsController->getHostgroupServiceStatus(), /plugins/npc/controllers/hostgroups.php[119]:NpcHostgroupsController->getHostgroupMemberServiceStatus(), /plugins/npc/controllers/hostgroups.php[271]:CactiErrorHandler())
2019.02.07 09:07:50 - ERROR PHP DEPRECATED in Plugin 'npc': Non-static method NpcServicesController::getServiceStatesByHost() should not be called statically in file: /usr/share/cacti/site/plugins/npc/controllers/hostgroups.php on line: 271
2019.02.07 09:07:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/npc/npc.php[83]:NpcNagiosController->getProgramStatus(), /plugins/npc/controllers/nagios.php[42]:NpcNagiosController->processInfo(), /plugins/npc/controllers/nagios.php[109]:CactiErrorHandler())
2019.02.07 09:07:50 - ERROR PHP NOTICE in Plugin 'npc': Undefined offset: 0 in file: /usr/share/cacti/site/plugins/npc/controllers/nagios.php on line: 109

Version Info: Linux: Ubuntu 18.01 LST Apache 2.4.29 MySQL 5.7.25-0ubuntu0.18.04.2 PHP 7.2.10-0ubuntu0.18.04.1 Nagios Core 4.4.3 Cacti 1.2.1 ndoutils 2.1.3