From f35d452a353eeb4aa93c24b050dcc36cc5d38aae Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Fri, 7 Jun 2019 14:48:53 +0200 Subject: [PATCH] adjust mongo perfdata --- database/mongodb/mode/connections.pm | 6 +++--- database/mongodb/mode/connectiontime.pm | 6 +++--- database/mongodb/mode/queries.pm | 6 +++--- database/mongodb/mode/replicationstatus.pm | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/database/mongodb/mode/connections.pm b/database/mongodb/mode/connections.pm index f2916f03f..3e05d8f02 100644 --- a/database/mongodb/mode/connections.pm +++ b/database/mongodb/mode/connections.pm @@ -58,7 +58,7 @@ sub set_counters { ], } }, - { label => 'total-created', nlabel => 'connections.persecond', set => { + { label => 'total-created', nlabel => 'connections.created.persecond', set => { key_values => [ { name => 'totalCreated', diff => 1 } ], output_template => 'Created: %.2f/s', per_second => 1, @@ -141,11 +141,11 @@ Threshold warning for connections usage (current over available) Threshold critical for connections usage (current over available) -=item B<--warning-connections-persecond> +=item B<--warning-connections-created-persecond> Threshold warning for connections created per second. -=item B<--critical-connections-persecond> +=item B<--critical-connections-created-persecond> Threshold critical for connections created per second. diff --git a/database/mongodb/mode/connectiontime.pm b/database/mongodb/mode/connectiontime.pm index d35d37cca..917a9a3b4 100644 --- a/database/mongodb/mode/connectiontime.pm +++ b/database/mongodb/mode/connectiontime.pm @@ -34,7 +34,7 @@ sub set_counters { ]; $self->{maps_counters}->{global} = [ - { label => 'connection-time', nlabel => 'database.connection.time.milliseconds', set => { + { label => 'connection-time', nlabel => 'connection.time.milliseconds', set => { key_values => [ { name => 'connection_time' } ], output_template => 'Connection established in %d ms', perfdatas => [ @@ -84,11 +84,11 @@ Check database connection time. =over 8 -=item B<--warning-database-connection-time-milliseconds> +=item B<--warning-connection-time-milliseconds> Threshold warning in milliseconds. -=item B<--critical-database-connection-time-milliseconds>> +=item B<--critical-connection-time-milliseconds>> Threshold critical in milliseconds. diff --git a/database/mongodb/mode/queries.pm b/database/mongodb/mode/queries.pm index 46b0a5160..7201cd7a3 100644 --- a/database/mongodb/mode/queries.pm +++ b/database/mongodb/mode/queries.pm @@ -34,7 +34,7 @@ sub set_counters { ]; $self->{maps_counters}->{global} = [ - { label => 'total', nlabel => 'queries.persecond', set => { + { label => 'total', nlabel => 'queries.total.persecond', set => { key_values => [ { name => 'total', diff => 1 } ], per_second => 1, output_template => 'Total : %d', @@ -119,13 +119,13 @@ Check number of queries executed (absolute and per second). =item B<--warning-queries-*-persecond> Threshold warning. -Can be: 'insert', 'query', 'update', +Can be: 'total', 'insert', 'query', 'update', 'delete', 'getmore', 'command' =item B<--critical-queries-*-persecond> Threshold critical. -Can be: 'insert', 'query', 'update', +Can be: 'total', 'insert', 'query', 'update', 'delete', 'getmore', 'command' =item B<--warning-queries-*-count> diff --git a/database/mongodb/mode/replicationstatus.pm b/database/mongodb/mode/replicationstatus.pm index 03396e7e3..e2bab3e45 100644 --- a/database/mongodb/mode/replicationstatus.pm +++ b/database/mongodb/mode/replicationstatus.pm @@ -239,12 +239,12 @@ Set critical threshold for members status (Default: '%{health} !~ /up/'). Can used special variables like: %{name}, %{state}, %{health}, %{slave_delay}, %{priority}. -=item B<--warning-instance-lag> +=item B<--warning-instance-lag-seconds> Threshold warning for replication lag between primary and secondary members. Must not be over 0 (between minus slaveDelay and 0). -=item B<--critical-instance-lag> +=item B<--critical-instance-lag-seconds> Threshold critical for replication lag between primary and secondary members. Must not be over 0 (between minus slaveDelay and 0).