Monitoring XenServer/XCP Host and VMs - Python
This script is an fork of the original written by Robert Gladewitz, that is designed to monitor pools of xenserver hosts through zabbix.
https://share.zabbix.com/cat-app/cluster/monitoring-citrix-xenserver-host-and-vms-based-on-pyton-xenapi
The changes makes are to optimize the access and security in environments with a large number of hosts / pools.
OBS: Script updates in the gitlab link.
This script is based on XenAPI, that is, all client (zabbix) calls to the server are performed via XenAPI, using the Python language.
In the original script the files were saved in the format "/tmp/xenapi.hostperformance.tmp". However, when you have an environment with many pools to manage, you woulding need to create another script to add to another pool.
In this modification, the script writes the file specifying which server was managed 'at that time', obeying the pattern "/tmp/xenapi.hostperformance.tmp.NAME-OF-HOSTSERVER".
With this you can capture all the information regarding the server without having to create other calls using duplicate script.
Another change was the way he handles passwords.
In the original script you would have to put the password in 'plain text' as a parameter in the script execution, this means that there in the zabbix php web form (template configuration) you would have to type the password in 'plain text', the which is a tremendous insecurity.
In this script we try to solve this problem by creating a function to read the credentials (scrambled with base64) of a file (credentials.txt) that will be in the same directory as the citrix.xenserver.py script. So you can leave the username and password parameter blank in zabbix web which will not influence script execution since these credentials will be read from this file in the directory inside the zabbix operating system.
more: https://gitlab.com/mlustosa/xenserver-zabbix-monitoring
Marllus Lustosa - [email protected]
Fabrício Silva - [email protected]
Change: 25. June 2018
Listing Details
2 version, '2018-07-31 13:10' modified