Cacti / plugin_mactrack

Mactrack Plugin for Cacti
GNU General Public License v2.0
12 stars 25 forks source link

Undefined array key 227 in file: lib/mactrack_functions.php on line: 848 #183

Closed jdcoats closed 1 year ago

jdcoats commented 1 year ago
2023/03/15 04:00:38 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_scanner.php[158]:get_IOS_dot1dTpFdbEntry_ports(), /plugins/mactrack/lib/mactrack_cisco.php[301]:build_InterfacesTable(), /plugins/mactrack/lib/mactrack_functions.php[848]:CactiErrorHandler())
2023/03/15 04:00:38 - ERROR PHP WARNING in Plugin 'mactrack': Undefined array key 227 in file: /var/www/localhost/htdocs/cacti/plugins/mactrack/lib/mactrack_functions.php on line: 848
TheWitness commented 1 year ago

Should be fixed.

jdcoats commented 1 year ago

now I get this

2023/04/03 12:22:04 - CMDPHP WARNING: Page:mactrack_view_sites.php?headercontent=true Generated a Fatal Error:500
2023/04/03 12:22:03 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'mactrack'
2023/04/03 12:22:03 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2023/04/03 12:22:03 - ERROR PHP ERROR in Plugin 'mactrack': Uncaught TypeError: Unsupported operand types: string / int in /var/www/localhost/htdocs/cacti/plugins/mactrack/lib/mactrack_functions.php:3044 Stack trace: #0 /var/www/localhost/htdocs/cacti/plugins/mactrack/lib/mactrack_functions.php(3101): mactrack_display_hours('disabled') #1 /var/www/localhost/htdocs/cacti/plugins/mactrack/mactrack_view_sites.php(332): mactrack_display_stats() #2 /var/www/localhost/htdocs/cacti/plugins/mactrack/mactrack_view_sites.php(36): mactrack_view_sites() #3 {main} thrown in file: /var/www/localhost/htdocs/cacti/plugins/mactrack/lib/mactrack_functions.php on line: 3044
jdcoats commented 1 year ago

I'm attempting to troubleshoot an issue where my memory usage would climb high enough that oom-killer would start killing spine and mariadb. I found that it was a mactrack run doing it so I disabled mactrack scanner just to verify the issue did'nt happen again before discussing with you how to get the information necessary for you to be able to fix it. Some recent changes started this, im just not sure where to start.

TheWitness commented 1 year ago

I'll likely get a little time at lunch. Are you tracking memory use by process?

jdcoats commented 1 year ago

I can make time today. I have hmib but it doesn't help me much because when it happens cacti's database gets killed so i dont see it or I do catch it happening during the day and can just barely get to look at htop and verify it then killall -9 php to recover real quick.

TheWitness commented 1 year ago

How about noon?

jdcoats commented 1 year ago

sure

jdcoats commented 1 year ago

Closing