zentavr / linet.mikrotik

Zabbix Helpers To Fetch Mikrotik's Counters via API
21 stars 7 forks source link

Script fails on disabled peers #8

Closed dcdamien closed 5 years ago

dcdamien commented 5 years ago

Router OS Version: 6.27

SUMMARY

Script crashes on disabled peers.

ISSUE TYPE
OS / ENVIRONMENT
STEPS TO REPRODUCE
/etc/zabbix/.venv/bin/python /etc/zabbix/mikrotik/zabbix.py -H 10.0.21.201 -u zabbix -p password -t
EXPECTED RESULTS

Script should handle disabled peers which lacks fileds such as state and uptime.

ACTUAL RESULTS

Currently script throws an error because status and uptime keys are missing.

zentavr commented 5 years ago

Hello @dcdamien,

Thank you for the report. I will check this and back to you later.