indent + useless code removed
This commit is contained in:
parent
9b39dcbd1b
commit
9c4654fbdb
|
@ -52,8 +52,7 @@ sub set_counters {
|
||||||
key_values => [ { name => 'poweredon' }, { name => 'total' } ],
|
key_values => [ { name => 'poweredon' }, { name => 'total' } ],
|
||||||
output_template => '%s VM(s) poweredon',
|
output_template => '%s VM(s) poweredon',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'poweredon', value => 'poweredon', template => '%s',
|
{ label => 'poweredon', template => '%s', min => 0, max => 'total' }
|
||||||
min => 0, max => 'total' }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -61,22 +60,20 @@ sub set_counters {
|
||||||
key_values => [ { name => 'poweredoff' }, { name => 'total' } ],
|
key_values => [ { name => 'poweredoff' }, { name => 'total' } ],
|
||||||
output_template => '%s VM(s) poweredoff',
|
output_template => '%s VM(s) poweredoff',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'poweredoff', value => 'poweredoff', template => '%s',
|
{ label => 'poweredoff', template => '%s', min => 0, max => 'total' }
|
||||||
min => 0, max => 'total' }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'total-suspended', nlabel => 'host.vm.suspended.current.count', set => {
|
{ label => 'total-suspended', nlabel => 'host.vm.suspended.current.count', set => {
|
||||||
key_values => [ { name => 'suspended' }, { name => 'total' } ],
|
key_values => [ { name => 'suspended' }, { name => 'total' } ],
|
||||||
output_template => '%s VM(s) suspended',
|
output_template => '%s VM(s) suspended',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'suspended', value => 'suspended', template => '%s',
|
{ label => 'suspended', template => '%s', min => 0, max => 'total' }
|
||||||
min => 0, max => 'total' }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{host} = [
|
$self->{maps_counters}->{host} = [
|
||||||
{ label => 'status', threshold => 0, set => {
|
{ label => 'status', threshold => 0, set => {
|
||||||
key_values => [ { name => 'state' } ],
|
key_values => [ { name => 'state' } ],
|
||||||
|
@ -90,8 +87,7 @@ sub set_counters {
|
||||||
key_values => [ { name => 'poweredon' }, { name => 'total' } ],
|
key_values => [ { name => 'poweredon' }, { name => 'total' } ],
|
||||||
output_template => '%s VM(s) poweredon',
|
output_template => '%s VM(s) poweredon',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'poweredon', value => 'poweredon', template => '%s',
|
{ label => 'poweredon', template => '%s', min => 0, max => 'total', label_extra_instance => 1 }
|
||||||
min => 0, max => 'total', label_extra_instance => 1 }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -99,8 +95,7 @@ sub set_counters {
|
||||||
key_values => [ { name => 'poweredoff' }, { name => 'total' } ],
|
key_values => [ { name => 'poweredoff' }, { name => 'total' } ],
|
||||||
output_template => '%s VM(s) poweredoff',
|
output_template => '%s VM(s) poweredoff',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'poweredoff', value => 'poweredoff', template => '%s',
|
{ label => 'poweredoff', template => '%s', min => 0, max => 'total', label_extra_instance => 1 }
|
||||||
min => 0, max => 'total', label_extra_instance => 1 }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -108,8 +103,7 @@ sub set_counters {
|
||||||
key_values => [ { name => 'suspended' }, { name => 'total' } ],
|
key_values => [ { name => 'suspended' }, { name => 'total' } ],
|
||||||
output_template => '%s VM(s) suspended',
|
output_template => '%s VM(s) suspended',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'suspended', value => 'suspended', template => '%s',
|
{ label => 'suspended', template => '%s', min => 0, max => 'total', label_extra_instance => 1 }
|
||||||
min => 0, max => 'total', label_extra_instance => 1 }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,13 +122,13 @@ sub new {
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
"esx-hostname:s" => { name => 'esx_hostname' },
|
'esx-hostname:s' => { name => 'esx_hostname' },
|
||||||
"filter" => { name => 'filter' },
|
'filter' => { name => 'filter' },
|
||||||
"scope-datacenter:s" => { name => 'scope_datacenter' },
|
'scope-datacenter:s' => { name => 'scope_datacenter' },
|
||||||
"scope-cluster:s" => { name => 'scope_cluster' },
|
'scope-cluster:s' => { name => 'scope_cluster' },
|
||||||
"unknown-status:s" => { name => 'unknown_status', default => '%{status} !~ /^connected$/i' },
|
'unknown-status:s' => { name => 'unknown_status', default => '%{status} !~ /^connected$/i' },
|
||||||
"warning-status:s" => { name => 'warning_status', default => '' },
|
'warning-status:s' => { name => 'warning_status', default => '' },
|
||||||
"critical-status:s" => { name => 'critical_status', default => '' },
|
'critical-status:s' => { name => 'critical_status', default => '' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
|
Loading…
Reference in New Issue