Installation
Installation
pve-monitor utilise le module Perl proxmox-ve-api-perl que vous pouvez trouver sur cpan ou sur github.
1 Installer les logiciels requis
Pour Debian | Ubuntu:
1 |
apt-get install git libjson-perl libwww-perl libio-socket-ssl-perl libswitch-perl |
2 Installer le module Perl proxmox-ve-api-perl
1 |
cpan install Net::Proxmox::VE |
3 Installer pve-monitor
1 2 3 4 |
wget -O pve-monitor.tar.gz https://github.com/dpiquet/pve-monitor/archive/Stable-1.07.tar.gz tar zxvf pve-monitor.tar.gz cd pve-monitor-Stable-1.07/ cp pve-monitor.pl /usr/lib/nagios/plugins/ |
Déclarer un cluster dans Nagios
Premièrement, définir la commande dans Nagios:
Add a file pve-monitor.cfg to /etc/nagios-plugins/config/:
Ajouter un fichier pve-monitor.cfg dans /etc/nagios-plugins/config/ avec le contenu suivant:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
define command{ command_name check_pve_cluster_nodes command_line /usr/bin/perl /usr/lib/nagios/plugins/pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --nodes } # This is the Proxmox < 4 method # 'check_pve_cluster_openvz command definition define command{ command_name check_pve_cluster_openvz command_line /usr/bin/perl /usr/lib/nagios/plugins/pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --openvz } # This is Proxmox >= 4 method # 'check_pve_cluster_containers command definition define command{ command_name check_pve_cluster_containers command_line /usr/bin/perl /usr/lib/nagios/plugins/pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --containers } # 'check_pve_cluster_qemu command definition define command{ command_name check_pve_cluster_qemu command_line /usr/bin/perl /usr/lib/nagios/plugins/pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --qemu } # 'check_pve_cluster_storage command definition define command{ command_name check_pve_cluster_storage command_line /usr/bin/perl /usr/lib/nagios/plugins/pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --storages } |