Installation
Installation
pve-monitor uses proxmox-ve-api-perl Perl module. You can install it from cpan.
1 Install needed software
For Debian | Ubuntu:
1 |
apt-get install git libjson-perl libwww-perl libio-socket-ssl-perl libswitch-perl |
2 Install proxmox-ve-api-perl Perl Module
1 |
cpan install Net::Proxmox::VE |
3 Install 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/ |
Define the Nagios commands
Add a file pve-monitor.cfg to /etc/nagios-plugins/config/:
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 } |