Skip to content

Commit

Permalink
PVE4 compat (lxc support)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpiquet committed Mar 2, 2016
1 parent f306cd4 commit 59dfdfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pve-monitor.pl
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ sub is_number {
}

}
case "openvz" {
case /openvz|lxc|container/ {
my $name = $2;
my $warnCpu = undef;
my $warnMem = undef;
Expand Down Expand Up @@ -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)] = (
{
Expand All @@ -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};
}
}
Expand Down Expand Up @@ -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};
Expand Down

0 comments on commit 59dfdfd

Please sign in to comment.