+ Change directory for centreon-map

This commit is contained in:
garnier-quentin 2015-08-14 10:08:18 +02:00
parent c535868f07
commit 7854d0fb4c
5 changed files with 15 additions and 16 deletions

View File

@ -17,7 +17,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::centreonmap::mode::eventqueue; package apps::centreon::map::jmx::mode::eventqueue;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -92,7 +92,7 @@ Check Centreon Map Session event queue size
Example: 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 =over 8

View File

@ -17,7 +17,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::centreonmap::mode::eventstatistics; package apps::centreon::map::jmx::mode::eventstatistics;
use base qw(centreon::plugins::mode); 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 $result = $self->{connector}->get_attributes(request => $self->{request}, nothing_quit => 0);
my $new_datas = {}; 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'); my $old_timestamp = $self->{statefile_cache}->get(name => 'last_timestamp');
$new_datas->{last_timestamp} = time(); $new_datas->{last_timestamp} = time();
@ -141,7 +141,7 @@ Check Centreon Map Event Statistics
Example: 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 =over 8

View File

@ -17,7 +17,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::centreonmap::mode::gates; package apps::centreon::map::jmx::mode::gates;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -43,7 +43,6 @@ sub check_options {
my ($self, %options) = @_; my ($self, %options) = @_;
$self->SUPER::init(%options); $self->SUPER::init(%options);
if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { 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}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
$self->{output}->option_exit(); $self->{output}->option_exit();
@ -95,7 +94,7 @@ Check Centreon Map Open Gates
Example: 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 =over 8

View File

@ -17,7 +17,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::centreonmap::mode::sessions; package apps::centreon::map::jmx::mode::sessions;
use base qw(centreon::plugins::mode); use base qw(centreon::plugins::mode);
@ -92,7 +92,7 @@ Check Centreon Map Number of sessions
Example: 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 =over 8

View File

@ -17,7 +17,7 @@
# limitations under the License. # limitations under the License.
# #
package apps::centreonmap::plugin; package apps::centreon::map::jmx::plugin;
use strict; use strict;
use warnings; use warnings;
@ -31,10 +31,10 @@ sub new {
$self->{version} = '0.1'; $self->{version} = '0.1';
%{$self->{modes}} = ( %{$self->{modes}} = (
'gates' => 'apps::centreonmap::mode::gates', 'gates' => 'apps::centreon::map::jmx::mode::gates',
'sessions' => 'apps::centreonmap::mode::sessions', 'sessions' => 'apps::centreon::map::jmx::mode::sessions',
'event-queue' => 'apps::centreonmap::mode::eventqueue', 'event-queue' => 'apps::centreon::map::jmx::mode::eventqueue',
'event-statistics' => 'apps::centreonmap::mode::eventstatistics', 'event-statistics' => 'apps::centreon::map::jmx::mode::eventstatistics',
); );
$self->{custom_modes}{jolokia} = 'centreon::common::protocols::jmx::custom::jolokia'; $self->{custom_modes}{jolokia} = 'centreon::common::protocols::jmx::custom::jolokia';
@ -47,6 +47,6 @@ __END__
=head1 PLUGIN DESCRIPTION =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 =cut