From e9452dc6b8ca1e31c949a3c5be49165e063642f9 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 26 May 2016 15:51:54 +0200 Subject: [PATCH] + add max total latency option --- apps/vmware/connector/mode/datastorevm.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/vmware/connector/mode/datastorevm.pm b/apps/vmware/connector/mode/datastorevm.pm index e9db8667b..99ecde259 100644 --- a/apps/vmware/connector/mode/datastorevm.pm +++ b/apps/vmware/connector/mode/datastorevm.pm @@ -44,8 +44,10 @@ sub new { "display-description" => { name => 'display_description' }, "warning:s" => { name => 'warning' }, "critical:s" => { name => 'critical' }, - "datastore-name:s" => { name => 'datastore_name' }, - "filter-datastore:s" => { name => 'filter_datastore' }, + "warning-max-total-latency:s" => { name => 'warning_max_total_latency' }, + "critical-max-total-latency:s" => { name => 'critical_max_total_latency' }, + "datastore-name:s" => { name => 'datastore_name' }, + "filter-datastore:s" => { name => 'filter_datastore' }, }); return $self; } @@ -54,7 +56,7 @@ sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); - foreach my $label (('warning', 'critical')) { + foreach my $label (('warning', 'critical', 'warning_max_total_latency', 'critical_max_total_latency')) { if (($self->{perfdata}->threshold_validate(label => $label, value => $self->{option_results}->{$label})) == 0) { my ($label_opt) = $label; $label_opt =~ tr/_/-/; @@ -146,6 +148,14 @@ Threshold warning in IOPs. Threshold critical in IOPs. +=item B<--warning-max-total-latency> + +Threshold warning in ms. + +=item B<--critical-max-total-latency> + +Threshold critical in ms. + =back =cut