diff --git a/centreon-plugins/apps/centreonmap/mode/eventqueue.pm b/centreon-plugins/apps/centreon/map/jmx/mode/eventqueue.pm similarity index 94% rename from centreon-plugins/apps/centreonmap/mode/eventqueue.pm rename to centreon-plugins/apps/centreon/map/jmx/mode/eventqueue.pm index 0d06bab08..ecab5277e 100644 --- a/centreon-plugins/apps/centreonmap/mode/eventqueue.pm +++ b/centreon-plugins/apps/centreon/map/jmx/mode/eventqueue.pm @@ -17,7 +17,7 @@ # limitations under the License. # -package apps::centreonmap::mode::eventqueue; +package apps::centreon::map::jmx::mode::eventqueue; use base qw(centreon::plugins::mode); @@ -92,7 +92,7 @@ Check Centreon Map Session event queue size Example: -perl centreon_plugins.pl --plugin=apps::centreonmap::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=eventqueue +perl centreon_plugins.pl --plugin=apps::centreon::map::jmx::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=event-queue =over 8 diff --git a/centreon-plugins/apps/centreonmap/mode/eventstatistics.pm b/centreon-plugins/apps/centreon/map/jmx/mode/eventstatistics.pm similarity index 94% rename from centreon-plugins/apps/centreonmap/mode/eventstatistics.pm rename to centreon-plugins/apps/centreon/map/jmx/mode/eventstatistics.pm index b91f29fd3..a23d7260c 100644 --- a/centreon-plugins/apps/centreonmap/mode/eventstatistics.pm +++ b/centreon-plugins/apps/centreon/map/jmx/mode/eventstatistics.pm @@ -17,7 +17,7 @@ # limitations under the License. # -package apps::centreonmap::mode::eventstatistics; +package apps::centreon::map::jmx::mode::eventstatistics; use base qw(centreon::plugins::mode); @@ -84,7 +84,7 @@ sub run { my $result = $self->{connector}->get_attributes(request => $self->{request}, nothing_quit => 0); my $new_datas = {}; - $self->{statefile_cache}->read(statefile => 'tomcat_' . $self->{mode} . '-' . md5_hex($self->{connector}->{url})); + $self->{statefile_cache}->read(statefile => 'centreon_map_' . $self->{mode} . '-' . md5_hex($self->{connector}->{url})); my $old_timestamp = $self->{statefile_cache}->get(name => 'last_timestamp'); $new_datas->{last_timestamp} = time(); @@ -141,7 +141,7 @@ Check Centreon Map Event Statistics Example: -perl centreon_plugins.pl --plugin=apps::centreonmap::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=eventstatistics +perl centreon_plugins.pl --plugin=apps::centreon::jmx::map::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=event-statistics =over 8 diff --git a/centreon-plugins/apps/centreonmap/mode/gates.pm b/centreon-plugins/apps/centreon/map/jmx/mode/gates.pm similarity index 95% rename from centreon-plugins/apps/centreonmap/mode/gates.pm rename to centreon-plugins/apps/centreon/map/jmx/mode/gates.pm index 1a329ab30..f9346482b 100644 --- a/centreon-plugins/apps/centreonmap/mode/gates.pm +++ b/centreon-plugins/apps/centreon/map/jmx/mode/gates.pm @@ -17,7 +17,7 @@ # limitations under the License. # -package apps::centreonmap::mode::gates; +package apps::centreon::map::jmx::mode::gates; use base qw(centreon::plugins::mode); @@ -43,7 +43,6 @@ sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); - if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); $self->{output}->option_exit(); @@ -95,7 +94,7 @@ Check Centreon Map Open Gates Example: -perl centreon_plugins.pl --plugin=apps::centreonmap::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=gates +perl centreon_plugins.pl --plugin=apps::centreon::map::jmx::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=gates =over 8 diff --git a/centreon-plugins/apps/centreonmap/mode/sessions.pm b/centreon-plugins/apps/centreon/map/jmx/mode/sessions.pm similarity index 94% rename from centreon-plugins/apps/centreonmap/mode/sessions.pm rename to centreon-plugins/apps/centreon/map/jmx/mode/sessions.pm index 200a39127..70749bb51 100644 --- a/centreon-plugins/apps/centreonmap/mode/sessions.pm +++ b/centreon-plugins/apps/centreon/map/jmx/mode/sessions.pm @@ -17,7 +17,7 @@ # limitations under the License. # -package apps::centreonmap::mode::sessions; +package apps::centreon::map::jmx::mode::sessions; use base qw(centreon::plugins::mode); @@ -92,7 +92,7 @@ Check Centreon Map Number of sessions Example: -perl centreon_plugins.pl --plugin=apps::centreonmap::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=sessions +perl centreon_plugins.pl --plugin=apps::centreon::map::jmx::plugin --custommode=jolokia --url=http://10.30.2.22:8080/jolokia-war --mode=sessions =over 8 diff --git a/centreon-plugins/apps/centreonmap/plugin.pm b/centreon-plugins/apps/centreon/map/jmx/plugin.pm similarity index 72% rename from centreon-plugins/apps/centreonmap/plugin.pm rename to centreon-plugins/apps/centreon/map/jmx/plugin.pm index f0e92ae68..2fb2c9626 100644 --- a/centreon-plugins/apps/centreonmap/plugin.pm +++ b/centreon-plugins/apps/centreon/map/jmx/plugin.pm @@ -17,7 +17,7 @@ # limitations under the License. # -package apps::centreonmap::plugin; +package apps::centreon::map::jmx::plugin; use strict; use warnings; @@ -31,10 +31,10 @@ sub new { $self->{version} = '0.1'; %{$self->{modes}} = ( - 'gates' => 'apps::centreonmap::mode::gates', - 'sessions' => 'apps::centreonmap::mode::sessions', - 'event-queue' => 'apps::centreonmap::mode::eventqueue', - 'event-statistics' => 'apps::centreonmap::mode::eventstatistics', + 'gates' => 'apps::centreon::map::jmx::mode::gates', + 'sessions' => 'apps::centreon::map::jmx::mode::sessions', + 'event-queue' => 'apps::centreon::map::jmx::mode::eventqueue', + 'event-statistics' => 'apps::centreon::map::jmx::mode::eventstatistics', ); $self->{custom_modes}{jolokia} = 'centreon::common::protocols::jmx::custom::jolokia'; @@ -47,6 +47,6 @@ __END__ =head1 PLUGIN DESCRIPTION -Check Centreon map informations. Need Jolokia agent and Map >= 4.0 +Check Centreon Map informations. Need Jolokia agent and Map >= 4.0. =cut