From 59a995f145573dbdd657add63163082a952111d0 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 21 Feb 2019 14:17:20 +0100 Subject: [PATCH] change lockstats option snmp informix --- database/informix/snmp/mode/lockstats.pm | 22 +++++++++++----------- database/informix/snmp/plugin.pm | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/database/informix/snmp/mode/lockstats.pm b/database/informix/snmp/mode/lockstats.pm index d4798c855..dd5706fc6 100644 --- a/database/informix/snmp/mode/lockstats.pm +++ b/database/informix/snmp/mode/lockstats.pm @@ -32,40 +32,40 @@ sub set_counters { $self->{maps_counters_type} = [ { name => 'global', type => 1, cb_prefix_output => 'prefix_instances_output', message_multiple => 'All instances are ok' } ]; - + $self->{maps_counters}->{global} = [ - { label => 'deadlks', set => { + { label => 'lock-dead', set => { key_values => [ { name => 'onServerDeadLocks', diff => 1 }, { name => 'display' } ], output_template => 'Deadlocks %d', perfdatas => [ - { label => 'deadlks', value => 'onServerDeadLocks_absolute', template => '%s', min => 0, + { label => 'lock_dead', value => 'onServerDeadLocks_absolute', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' }, ], } }, - { label => 'lockwts', set => { + { label => 'lock-wait', set => { key_values => [ { name => 'onServerLockWaits', diff => 1 }, { name => 'display' } ], output_template => 'Lock Waits %d', perfdatas => [ - { label => 'lockwts', value => 'onServerLockWaits_absolute', template => '%s', min => 0, + { label => 'lock_wait', value => 'onServerLockWaits_absolute', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' }, ], } }, - { label => 'lockreqs', set => { + { label => 'lock-request', set => { key_values => [ { name => 'onServerLockRequests', diff => 1 }, { name => 'display' } ], output_template => 'Lock Requests %d', perfdatas => [ - { label => 'lockreqs', value => 'onServerLockRequests_absolute', template => '%s', min => 0, + { label => 'lock_request', value => 'onServerLockRequests_absolute', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' }, ], } }, - { label => 'lktouts', set => { + { label => 'lock-timeout', set => { key_values => [ { name => 'onServerLockTimeouts', diff => 1 }, { name => 'display' } ], output_template => 'Lock Timeouts %d', perfdatas => [ - { label => 'lktouts', value => 'onServerLockTimeouts_absolute', template => '%s', min => 0, + { label => 'lock_timeout', value => 'onServerLockTimeouts_absolute', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' }, ], } @@ -144,12 +144,12 @@ Check instance locks. =item B<--warning-*> Threshold warning. -Can be: 'deadlks', 'lockwts', 'lockreqs', 'lktouts'. +Can be: 'lock-dead', 'lock-wait', 'lock-request', 'lock-timeout'. =item B<--critical-*> Threshold critical. -Can be: 'deadlks', 'lockwts', 'lockreqs', 'lktouts'. +Can be: 'lock-dead', 'lock-wait', 'lock-request', 'lock-timeout'. =back diff --git a/database/informix/snmp/plugin.pm b/database/informix/snmp/plugin.pm index 75aeea450..1a145665d 100644 --- a/database/informix/snmp/plugin.pm +++ b/database/informix/snmp/plugin.pm @@ -37,9 +37,9 @@ sub new { 'global-cache' => 'database::informix::snmp::mode::globalcache', 'list-dbspaces' => 'database::informix::snmp::mode::listdbspaces', 'list-instances' => 'database::informix::snmp::mode::listinstances', + 'lock-stats' => 'database::informix::snmp::mode::lockstats', 'logfile-usage' => 'database::informix::snmp::mode::logfileusage', 'sessions' => 'database::informix::snmp::mode::sessions', - 'lock-stats' => 'database::informix::snmp::mode::lockstats', ); return $self;