Hello, everyone.
The script allows to get average last month ICMP ping report for hostgroups or hosts and create Excel report.
Also, this script shows last month problems history data in the separate table which includes such columns as: Hostname, Event ID, Problem Started date and time, Resolved Event ID, Resolved date and time.
Example
The first worksheet with SLA info:
The second worksheet with Problems info:
Requirements
- pyzabbix
- getpass (optionally, you may type directly API user login and password)
- openpyxl
Important
It is necessary to set by -K argument Zabbix item filter variable according to the monitoring item ('icmpping[,5]' or 'icmpping' or another one), for example:
-K icmpping[,5]
By default:
itemFilter = {'key_': 'icmpping'}
How to use?
Please enter hostgroup name and item filter key as argument:
sla_report.py -G '<hostgroup_name>' -K '<item_key>'
or any number of hosts divided by comma and item filter key:
sla_report.py -H '<host_name>,<host_name>,<host_name>' -K '<item_key>
Example:
sla_report.py -G 'Zabbix servers' -K 'icmpping'
Have a nice day.