diff --git a/centreon-plugins/centreon/plugins/script_custom.pm b/centreon-plugins/centreon/plugins/script_custom.pm index 8e0034c10..fc069844f 100644 --- a/centreon-plugins/centreon/plugins/script_custom.pm +++ b/centreon-plugins/centreon/plugins/script_custom.pm @@ -33,13 +33,14 @@ sub new { $self->{options}->add_options( arguments => { - 'mode:s' => { name => 'mode_name' }, - 'dyn-mode:s' => { name => 'dynmode_name' }, - 'list-mode' => { name => 'list_mode' }, - 'custommode:s' => { name => 'custommode_name' }, - 'list-custommode' => { name => 'list_custommode' }, - 'multiple' => { name => 'multiple' }, - 'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it + 'mode:s' => { name => 'mode_name' }, + 'dyn-mode:s' => { name => 'dynmode_name' }, + 'list-mode' => { name => 'list_mode' }, + 'custommode:s' => { name => 'custommode_name' }, + 'list-custommode' => { name => 'list_custommode' }, + 'multiple' => { name => 'multiple' }, + 'no-sanity-options' => { name => 'no_sanity_options' }, + 'pass-manager:s' => { name => 'pass_manager' }, } ); $self->{version} = '1.0'; @@ -68,8 +69,10 @@ sub load_custom_mode { my ($self, %options) = @_; $self->is_custommode(custommode => $self->{custommode_name}); - centreon::plugins::misc::mymodule_load(output => $self->{output}, module => $self->{custom_modes}{$self->{custommode_name}}, - error_msg => "Cannot load module --custommode."); + centreon::plugins::misc::mymodule_load( + output => $self->{output}, module => $self->{custom_modes}{$self->{custommode_name}}, + error_msg => 'Cannot load module --custommode.' + ); $self->{custommode_current} = $self->{custom_modes}{$self->{custommode_name}}->new(options => $self->{options}, output => $self->{output}, mode => $self->{custommode_name}); } @@ -91,7 +94,7 @@ sub init { if (defined($self->{list_custommode})) { $self->list_custommode(); } - $self->{options}->set_sanity(); + $self->{options}->set_sanity() if (!defined($self->{no_sanity_options})); # Output HELP $self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS'); @@ -293,6 +296,10 @@ List available custom modes. Multiple custom mode objects (some mode needs it). +=item B<--pass-manager> + +Use a password manager. + =back =head1 DESCRIPTION diff --git a/centreon-plugins/centreon/plugins/script_simple.pm b/centreon-plugins/centreon/plugins/script_simple.pm index ca141f7e5..6194585c5 100644 --- a/centreon-plugins/centreon/plugins/script_simple.pm +++ b/centreon-plugins/centreon/plugins/script_simple.pm @@ -31,12 +31,13 @@ sub new { $self->{output} = $options{output}; $self->{options}->add_options( - arguments => { - 'mode:s' => { name => 'mode_name' }, - 'dyn-mode:s' => { name => 'dynmode_name' }, - 'list-mode' => { name => 'list_mode' }, - 'mode-version:s' => { name => 'mode_version' }, - 'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it + arguments => { + 'mode:s' => { name => 'mode_name' }, + 'dyn-mode:s' => { name => 'dynmode_name' }, + 'list-mode' => { name => 'list_mode' }, + 'mode-version:s' => { name => 'mode_version' }, + 'no-sanity-options' => { name => 'no_sanity_options' }, + 'pass-manager:s' => { name => 'pass_manager' }, } ); $self->{version} = '1.0'; @@ -72,7 +73,7 @@ sub init { if (defined($self->{list_mode})) { $self->list_mode(); } - $self->{options}->set_sanity(); + $self->{options}->set_sanity() if (!defined($self->{no_sanity_options})); # Output HELP $self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS'); @@ -219,6 +220,10 @@ Check minimal version of mode. If not, unknown error. Display plugin version. +=item B<--pass-manager> + +Use a password manager. + =back =head1 DESCRIPTION diff --git a/centreon-plugins/centreon/plugins/script_snmp.pm b/centreon-plugins/centreon/plugins/script_snmp.pm index 783e62e5e..e706da395 100644 --- a/centreon-plugins/centreon/plugins/script_snmp.pm +++ b/centreon-plugins/centreon/plugins/script_snmp.pm @@ -34,12 +34,12 @@ sub new { $self->{options}->add_options( arguments => { - 'mode:s' => { name => 'mode_name' }, - 'dyn-mode:s' => { name => 'dynmode_name' }, - 'list-mode' => { name => 'list_mode' }, - 'mode-version:s' => { name => 'mode_version' }, - 'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it - 'pass-manager:s' => { name => 'pass_manager' }, + 'mode:s' => { name => 'mode_name' }, + 'dyn-mode:s' => { name => 'dynmode_name' }, + 'list-mode' => { name => 'list_mode' }, + 'mode-version:s' => { name => 'mode_version' }, + 'no-sanity-options' => { name => 'no_sanity_options' }, + 'pass-manager:s' => { name => 'pass_manager' }, } ); $self->{version} = '1.0'; @@ -75,7 +75,7 @@ sub init { if (defined($self->{list_mode})) { $self->list_mode(); } - $self->{options}->set_sanity(); + $self->{options}->set_sanity() if (!defined($self->{no_sanity_options})); # Output HELP $self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS'); diff --git a/centreon-plugins/centreon/plugins/script_sql.pm b/centreon-plugins/centreon/plugins/script_sql.pm index f97d0812d..c68f2421c 100644 --- a/centreon-plugins/centreon/plugins/script_sql.pm +++ b/centreon-plugins/centreon/plugins/script_sql.pm @@ -32,15 +32,16 @@ sub new { $self->{output} = $options{output}; $self->{options}->add_options( - arguments => { - 'mode:s' => { name => 'mode_name' }, - 'dyn-mode:s' => { name => 'dynmode_name' }, - 'list-mode' => { name => 'list_mode' }, - 'mode-version:s' => { name => 'mode_version' }, - 'sqlmode:s' => { name => 'sqlmode_name', default => 'dbi' }, - 'list-sqlmode' => { name => 'list_sqlmode' }, - 'multiple' => { name => 'multiple' }, - 'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it + arguments => { + 'mode:s' => { name => 'mode_name' }, + 'dyn-mode:s' => { name => 'dynmode_name' }, + 'list-mode' => { name => 'list_mode' }, + 'mode-version:s' => { name => 'mode_version' }, + 'sqlmode:s' => { name => 'sqlmode_name', default => 'dbi' }, + 'list-sqlmode' => { name => 'list_sqlmode' }, + 'multiple' => { name => 'multiple' }, + 'no-sanity-options' => { name => 'no_sanity_options' }, + 'pass-manager:s' => { name => 'pass_manager' }, } ); $self->{version} = '1.0'; @@ -83,7 +84,7 @@ sub init { if (defined($self->{list_sqlmode})) { $self->list_sqlmode(); } - $self->{options}->set_sanity(); + $self->{options}->set_sanity() if (!defined($self->{no_sanity_options})); # Output HELP $self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS'); @@ -292,6 +293,10 @@ List available sql modes. Multiple database connections (some mode needs it). +=item B<--pass-manager> + +Use a password manager. + =back =head1 DESCRIPTION diff --git a/centreon-plugins/centreon/plugins/script_wsman.pm b/centreon-plugins/centreon/plugins/script_wsman.pm index 2c9b62159..0cc7e6e17 100644 --- a/centreon-plugins/centreon/plugins/script_wsman.pm +++ b/centreon-plugins/centreon/plugins/script_wsman.pm @@ -33,12 +33,13 @@ sub new { $self->{output} = $options{output}; $self->{options}->add_options( - arguments => { - 'mode:s' => { name => 'mode_name' }, - 'dyn-mode:s' => { name => 'dynmode_name' }, - 'list-mode' => { name => 'list_mode' }, - 'mode-version:s' => { name => 'mode_version' }, - 'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it + arguments => { + 'mode:s' => { name => 'mode_name' }, + 'dyn-mode:s' => { name => 'dynmode_name' }, + 'list-mode' => { name => 'list_mode' }, + 'mode-version:s' => { name => 'mode_version' }, + 'no-sanity-options' => { name => 'no_sanity_options' }, + 'pass-manager:s' => { name => 'pass_manager' }, } ); $self->{version} = '1.0'; @@ -74,7 +75,7 @@ sub init { if (defined($self->{list_mode})) { $self->list_mode(); } - $self->{options}->set_sanity(); + $self->{options}->set_sanity() if (!defined($self->{no_sanity_options})); # Output HELP $self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS'); @@ -223,6 +224,10 @@ Check minimal version of mode. If not, unknown error. Display plugin version. +=item B<--pass-manager> + +Use a password manager. + =back =head1 DESCRIPTION