Cacti / plugin_mikrotik

Mikrotik Plugin for Cacti
GNU General Public License v2.0
60 stars 24 forks source link

Poller stops on Key DroppedOut #57

Open MegaAndrey opened 2 years ago

MegaAndrey commented 2 years ago

Poller process stops and completely overload CPU.

When I try to run poller with --debug option this is the last message DEBUG: Elapsed: 93, Message: Key:'DroppedOut', Orig:'.1.3.6.1.4.1.14988.1.1.2.1.1.15.1266', Val:'0', Index:'1266', Base:'.1.3.6.1.4.1.14988.1.1.2.1.1.15'

TheWitness commented 2 years ago

strace the binary.

MegaAndrey commented 2 years ago

Seems like it stops on collect_pppoe_users_api($host); API user with read only permissions configured and connected.

MegaAndrey commented 2 years ago

If I comment this section it works normally

            if (runCollector($start, $queues_lastrun, $queues_freq)) {
                    collect_queues($host);
            #       collect_pppoe_users_api($host);
            }

btw maybe you can help me with wrong queues statistics? As I see it's incorrect counting.

chrome_FaJzf0UytS

winbox_IbaDYSTDNb

And this happening with all queues graphs.

TheWitness commented 2 years ago

What Time Zone are you in?

MegaAndrey commented 2 years ago

Cacti on GMT+4:30. in php.ini date.timezone = "Asia/Kabul"

But I'm on another TZ.

MegaAndrey commented 2 years ago

2022-03-15 08:07:21 - CMDPHP PHP ERROR WARNING Backtrace: (/graph_view.php[33]:include_once(), /lib/timespan_settings.php[38]:initialize_timespan(), /lib/timespan_settings.php[59]:set_preset_timespan(), /lib/timespan_settings.php[182]:get_timespan(), /lib/time.php[58]:strtotime(), CactiErrorHandler()) 2022-03-15 08:07:21 - ERROR PHP WARNING: strtotime(): Invalid date.timezone value 'TZ=GMT-4:30', we selected the timezone 'UTC' for now. in file: /usr/share/cacti/lib/time.php on line: 58 2022-03-15 08:07:21 - CMDPHP PHP ERROR WARNING Backtrace: (/graph_view.php[27]:include(), /include/auth.php[130]:check_auth_cookie(), /lib/auth.php[111]:cacti_log(), /lib/functions.php[1268]:cacti_browser_zone_set(), /lib/functions.php[6899]:ini_set(), CactiErrorHandler()) 2022-03-15 08:07:21 - ERROR PHP WARNING: ini_set(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. in file: /usr/share/cacti/lib/functions.php on line: 6899 2022-03-15 08:07:21 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_view.php[27]:include(), /include/auth.php[130]:check_auth_cookie(), /lib/auth.php[109]:set_auth_cookie(), /lib/auth.php[74]:cacti_cookie_session_set(), /lib/functions.php[6864]:CactiErrorHandler()) 2022-03-15 08:07:21 - ERROR PHP NOTICE: Undefined variable: nssecret in file: /usr/share/cacti/lib/functions.php on line: 6864 2022-03-15 08:07:21 - CMDPHP PHP ERROR WARNING Backtrace: (/graph_view.php[27]:include(), /include/auth.php[130]:check_auth_cookie(), /lib/auth.php[109]:set_auth_cookie(), /lib/auth.php[74]:cacti_cookie_session_set(), /lib/functions.php[6852]:CactiErrorHandler()) 2022-03-15 08:07:21 - ERROR PHP WARNING: Missing argument 3 for cacti_cookie_session_set(), called in /usr/share/cacti/lib/auth.php on line 74 and defined in file: /usr/share/cacti/lib/functions.php on line: 6852

MegaAndrey commented 2 years ago

BTW queue's statistic is very different from snmp's port uplink. I mean we physically cannot be greater than the value of our uplink. chrome_H2P6v6Siwa .

MegaAndrey commented 2 years ago

Same queue's graphs from MKT looks much better.

chrome_b56dFYlV5N

TheWitness commented 2 years ago

Update to the 1.2.x branch as soon as you can or 1.2.20 which will be released early next month for the TZ issue correction.

TheWitness commented 2 years ago

You could cherry pick the tz functions in lib/functions.php too.

MegaAndrey commented 2 years ago

TZ functions added and seems like the issue with timezone solved, but graphs still shows wrong data.

TheWitness commented 2 years ago

Yea, for these ones, we would have to do a session online in my off hours, possibly a weekend.

MegaAndrey commented 2 years ago

I would be very happy about it, please write when you'll have some free time, I will be waiting for you

TheWitness commented 2 years ago

What TZ are you in?

MegaAndrey commented 2 years ago

EU, can we contact via telegram? @Ararelos

TheWitness commented 2 years ago

My Telegram does not allow me to reach out from my phone.