lausser / GLPlugin

Perl modules providing the basis for my Naemon plugins
15 stars 28 forks source link

Handle MikroTik RouterOS/SwitchOS to prevent timeout #33

Open Virsacer opened 1 month ago

Virsacer commented 1 month ago

Hi, queriing MikroTik devices took minutes, so I added this handling.

codeautopilot[bot] commented 1 month ago

PR summary

This Pull Request addresses a performance issue when querying MikroTik RouterOS and SwitchOS devices using SNMP. The modification aims to prevent timeouts by implementing a more efficient method for retrieving SNMP table objects specific to these devices. The change involves checking the device type and applying a tailored approach to handle SNMP table queries, which should significantly reduce the query time.

Suggestion

Consider adding unit tests to verify the new behavior for MikroTik devices and ensure that the changes do not introduce regressions for other device types. Additionally, updating the documentation to reflect the new handling for MikroTik devices would be beneficial for future maintenance.