fix(counter): replaced the unit of the latency for vmware vsan-cluster-usage + other small changes (#5139)
REFS: CTOR-760
This commit is contained in:
parent
c31dfa54dd
commit
95bff5ff6b
|
@ -83,19 +83,19 @@ sub set_counters {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'backend-latency-read', nlabel => 'cluster.vsan.backend.latency.read.milliseconds', display_ok => 0, set => {
|
{ label => 'backend-latency-read', nlabel => 'cluster.vsan.backend.latency.read.microseconds', display_ok => 0, set => {
|
||||||
key_values => [ { name => 'latencyAvgRead' } ],
|
key_values => [ { name => 'latencyAvgRead' } ],
|
||||||
output_template => 'read latency: %s ms',
|
output_template => 'read latency: %s µs',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ template => '%s', unit => 'ms', min => 0 }
|
{ template => '%s', unit => 'µs', min => 0 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'backend-latency-write', nlabel => 'cluster.vsan.backend.latency.write.milliseconds', display_ok => 0, set => {
|
{ label => 'backend-latency-write', nlabel => 'cluster.vsan.backend.latency.write.microseconds', display_ok => 0, set => {
|
||||||
key_values => [ { name => 'latencyAvgWrite' } ],
|
key_values => [ { name => 'latencyAvgWrite' } ],
|
||||||
output_template => 'write latency: %s ms',
|
output_template => 'write latency: %s µs',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ template => '%s', unit => 'ms', min => 0 }
|
{ template => '%s', unit => 'µs', min => 0 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,6 @@ sub new {
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'cluster-name:s' => { name => 'cluster_name' },
|
'cluster-name:s' => { name => 'cluster_name' },
|
||||||
'filter' => { name => 'filter' },
|
|
||||||
'scope-datacenter:s' => { name => 'scope_datacenter' }
|
'scope-datacenter:s' => { name => 'scope_datacenter' }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -133,11 +132,18 @@ sub manage_selection {
|
||||||
|
|
||||||
foreach my $cluster_id (keys %{$response->{data}}) {
|
foreach my $cluster_id (keys %{$response->{data}}) {
|
||||||
my $cluster_name = $response->{data}->{$cluster_id}->{name};
|
my $cluster_name = $response->{data}->{$cluster_id}->{name};
|
||||||
|
next if ( !centreon::plugins::misc::is_empty($self->{option_results}->{cluster_name})
|
||||||
|
and $cluster_name !~ /$self->{option_results}->{cluster_name}/ );
|
||||||
|
|
||||||
$self->{cluster}->{$cluster_name} = {
|
$self->{cluster}->{$cluster_name} = {
|
||||||
display => $cluster_name,
|
display => $cluster_name,
|
||||||
%{$response->{data}->{$cluster_id}->{cluster_domcompmgr}},
|
%{$response->{data}->{$cluster_id}->{cluster_domcompmgr}},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if ( scalar(keys(%{$self->{cluster}}) ) == 0) {
|
||||||
|
my $explanation = centreon::plugins::misc::is_empty($self->{option_results}->{cluster_name}) ? '' : ' matching /' . $self->{option_results}->{cluster_name} . '/';
|
||||||
|
$self->{output}->output_add(severity => 'UNKNOWN', short_msg => "No clusters found" . $explanation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -146,30 +152,83 @@ __END__
|
||||||
|
|
||||||
=head1 MODE
|
=head1 MODE
|
||||||
|
|
||||||
Check Vsan cluster usage
|
Check VMware vSAN cluster usage.
|
||||||
|
|
||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
=item B<--cluster-name>
|
=item B<--cluster-name>
|
||||||
|
|
||||||
cluster to check.
|
Define which clusters should be monitored based on their name.
|
||||||
If not set, we check all clusters.
|
This option will be treated as a regular expression.
|
||||||
|
|
||||||
=item B<--filter>
|
|
||||||
|
|
||||||
Cluster name is a regexp.
|
|
||||||
|
|
||||||
=item B<--scope-datacenter>
|
=item B<--scope-datacenter>
|
||||||
|
|
||||||
Search in following datacenter(s) (can be a regexp).
|
Define which clusters to monitor based on their data center's name.
|
||||||
|
This option will be treated as a regular expression.
|
||||||
|
|
||||||
=item B<--warning-*> B<--critical-*>
|
=item B<--warning-backend-write-usage>
|
||||||
|
|
||||||
Thresholds.
|
Thresholds.
|
||||||
Can be: 'backend-write-usage', 'backend-read-usage',
|
|
||||||
'backend-outstanding-io', 'backend-congestions',
|
=item B<--critical-backend-write-usage>
|
||||||
'backend-throughput-read', 'backend-throughput-write'
|
|
||||||
.
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-read-usage>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-read-usage>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-outstanding-io>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-outstanding-io>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-congestions>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-congestions>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-throughput-read>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-throughput-read>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-throughput-write>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-throughput-write>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-latency-read>
|
||||||
|
|
||||||
|
Thresholds in microseconds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-latency-read>
|
||||||
|
|
||||||
|
Thresholds in microseconds.
|
||||||
|
|
||||||
|
=item B<--warning-backend-latency-write>
|
||||||
|
|
||||||
|
Thresholds in microseconds.
|
||||||
|
|
||||||
|
=item B<--critical-backend-latency-write>
|
||||||
|
|
||||||
|
Thresholds in microseconds.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
--add-sysdesc
|
--add-sysdesc
|
||||||
--api-filter-orgs
|
--api-filter-orgs
|
||||||
--api-password
|
--api-password
|
||||||
--api-password
|
|
||||||
--api-path
|
--api-path
|
||||||
--api-token
|
--api-token
|
||||||
--api-username
|
--api-username
|
||||||
|
@ -10,6 +9,8 @@
|
||||||
--cacert-file
|
--cacert-file
|
||||||
--cert-pkcs12
|
--cert-pkcs12
|
||||||
--cert-pwd
|
--cert-pwd
|
||||||
|
--critical-backend-congestions
|
||||||
|
--critical-backend-outstanding-io
|
||||||
--critical-bytesallocatedpercentage
|
--critical-bytesallocatedpercentage
|
||||||
--critical-na
|
--critical-na
|
||||||
--dfsr
|
--dfsr
|
||||||
|
@ -48,9 +49,12 @@
|
||||||
--oid-display
|
--oid-display
|
||||||
--oid-extra-display
|
--oid-extra-display
|
||||||
--oid-filter
|
--oid-filter
|
||||||
|
--scope-datacenter
|
||||||
--sql-errors-exit
|
--sql-errors-exit
|
||||||
--urlpath
|
--urlpath
|
||||||
--use-ucd
|
--use-ucd
|
||||||
|
--warning-backend-congestions
|
||||||
|
--warning-backend-outstanding-io
|
||||||
--warning-bytesallocatedpercentage
|
--warning-bytesallocatedpercentage
|
||||||
--warning-na
|
--warning-na
|
||||||
-EncodedCommand
|
-EncodedCommand
|
||||||
|
@ -65,38 +69,24 @@ Ansible
|
||||||
Avigilon
|
Avigilon
|
||||||
Backbox
|
Backbox
|
||||||
Centreon
|
Centreon
|
||||||
cpu-utilization-1m
|
|
||||||
cpu-utilization-5m
|
|
||||||
cpu-utilization-5s
|
|
||||||
Datacore
|
|
||||||
DC4
|
DC4
|
||||||
dcdiag
|
Datacore
|
||||||
dfsrevent
|
|
||||||
FCCapacity
|
FCCapacity
|
||||||
Fortigate
|
Fortigate
|
||||||
Fortinet
|
Fortinet
|
||||||
frsevent
|
|
||||||
HPE
|
HPE
|
||||||
HashiCorp
|
HashiCorp
|
||||||
ISAM
|
|
||||||
IMEI
|
IMEI
|
||||||
IpAddr
|
|
||||||
ISAM
|
ISAM
|
||||||
|
IpAddr
|
||||||
Iwsva
|
Iwsva
|
||||||
JOBQ
|
JOBQ
|
||||||
kccevent
|
Kubernetes
|
||||||
Loggly
|
Loggly
|
||||||
MBean
|
MBean
|
||||||
MIB
|
MIB
|
||||||
MQTT
|
MQTT
|
||||||
machineaccount
|
|
||||||
Meraki
|
Meraki
|
||||||
module-cellradio-rscp
|
|
||||||
module-cellradio-csq
|
|
||||||
module-cellradio-rsrp
|
|
||||||
module-cellradio-rsrq
|
|
||||||
module-cellradio-snr
|
|
||||||
modules-cellradio-detected
|
|
||||||
Mosquitto
|
Mosquitto
|
||||||
NLCapacity
|
NLCapacity
|
||||||
NTLMv2
|
NTLMv2
|
||||||
|
@ -110,19 +100,23 @@ QoS
|
||||||
RestAPI
|
RestAPI
|
||||||
RFC1628
|
RFC1628
|
||||||
RRDCached
|
RRDCached
|
||||||
Sansymphony
|
RestAPI
|
||||||
SNMP
|
SNMP
|
||||||
SSDCapacity
|
SSDCapacity
|
||||||
SSH
|
SSH
|
||||||
|
Sansymphony
|
||||||
SureBackup
|
SureBackup
|
||||||
SysVol
|
SysVol
|
||||||
TCP
|
TCP
|
||||||
|
Teldat
|
||||||
TrendMicro
|
TrendMicro
|
||||||
UCD
|
UCD
|
||||||
VDSL2
|
VDSL2
|
||||||
VM
|
VM
|
||||||
|
VMware
|
||||||
VPN
|
VPN
|
||||||
Veeam
|
Veeam
|
||||||
|
VeloCloud
|
||||||
WSMAN
|
WSMAN
|
||||||
XPath
|
XPath
|
||||||
allCapacity
|
allCapacity
|
||||||
|
@ -130,12 +124,18 @@ api.meraki.com
|
||||||
cardtemperature
|
cardtemperature
|
||||||
connections-dhcp
|
connections-dhcp
|
||||||
connections-dns
|
connections-dns
|
||||||
deduplication
|
cpu-utilization-1m
|
||||||
|
cpu-utilization-5m
|
||||||
|
cpu-utilization-5s
|
||||||
datasource
|
datasource
|
||||||
|
dcdiag
|
||||||
|
deduplication
|
||||||
deltaps
|
deltaps
|
||||||
df
|
df
|
||||||
|
dfsrevent
|
||||||
eth
|
eth
|
||||||
fanspeed
|
fanspeed
|
||||||
|
frsevent
|
||||||
hashicorpvault
|
hashicorpvault
|
||||||
ifAlias
|
ifAlias
|
||||||
ifDesc
|
ifDesc
|
||||||
|
@ -148,10 +148,18 @@ ipv4
|
||||||
ipv6
|
ipv6
|
||||||
jobqueue
|
jobqueue
|
||||||
jobqueues
|
jobqueues
|
||||||
|
kccevent
|
||||||
keepass
|
keepass
|
||||||
Kubernetes
|
Kubernetes
|
||||||
ldap
|
ldap
|
||||||
license-instances-usage-prct
|
license-instances-usage-prct
|
||||||
|
machineaccount
|
||||||
|
module-cellradio-csq
|
||||||
|
module-cellradio-rscp
|
||||||
|
module-cellradio-rsrp
|
||||||
|
module-cellradio-rsrq
|
||||||
|
module-cellradio-snr
|
||||||
|
modules-cellradio-detected
|
||||||
multiple
|
multiple
|
||||||
NTP
|
NTP
|
||||||
nagios
|
nagios
|
||||||
|
@ -171,7 +179,6 @@ queue-messages-inflighted
|
||||||
sfp.temperature
|
sfp.temperature
|
||||||
space-usage-prct
|
space-usage-prct
|
||||||
teampass
|
teampass
|
||||||
Teldat
|
|
||||||
timeframe
|
timeframe
|
||||||
topic-messages-inflighted
|
topic-messages-inflighted
|
||||||
total-offline-prct
|
total-offline-prct
|
||||||
|
@ -189,5 +196,5 @@ VDSL2
|
||||||
Veeam
|
Veeam
|
||||||
VeloCloud
|
VeloCloud
|
||||||
VMware
|
VMware
|
||||||
WSMAN
|
vSAN
|
||||||
|
WSMAN
|
Loading…
Reference in New Issue