From 59dfdfd1ddf9811f17ac6ca6d8faa8938e245e6b Mon Sep 17 00:00:00 2001 From: Damien PIQUET Date: Wed, 2 Mar 2016 21:41:18 +0100 Subject: [PATCH] PVE4 compat (lxc support) --- pve-monitor.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pve-monitor.pl b/pve-monitor.pl index 28a8213..ec436cf 100755 --- a/pve-monitor.pl +++ b/pve-monitor.pl @@ -419,7 +419,7 @@ sub is_number { } } - case "openvz" { + case /openvz|lxc|container/ { my $name = $2; my $warnCpu = undef; my $warnMem = undef; @@ -857,7 +857,7 @@ sub is_number { #fill monitored pool members not defined in config already foreach my $member( @$members ) { switch ($member->{type}) { - case "openvz" { + case /openvz|lxc/ { unless (grep $_->{name} eq $member->{name}, @monitoredOpenvz) { $monitoredOpenvz[scalar(@monitoredOpenvz)] = ( { @@ -881,7 +881,7 @@ sub is_number { pool => $mpool->{name}, },); - print "Loaded openvz " . $member->{name} . " from pool " . $mpool->{name} . "\n" + print "Loaded container " . $member->{name} . " from pool " . $mpool->{name} . "\n" if $arguments{debug}; } } @@ -1006,7 +1006,7 @@ sub is_number { next; } - case "openvz" { + case /openvz|lxc/ { #loop monitored nodes to increase mem_hi_limit foreach my $mnode( @monitoredNodes ) { next unless $mnode->{name} eq $item->{node};