mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
+ Set sanity mode by default
This commit is contained in:
parent
8f5ff52f26
commit
6af37d506e
@ -42,7 +42,7 @@ sub new {
|
|||||||
'custommode:s' => { name => 'custommode_name' },
|
'custommode:s' => { name => 'custommode_name' },
|
||||||
'list-custommode' => { name => 'list_custommode' },
|
'list-custommode' => { name => 'list_custommode' },
|
||||||
'multiple' => { name => 'multiple' },
|
'multiple' => { name => 'multiple' },
|
||||||
'sanity-options' => { name => 'sanity_options' },
|
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
@ -93,9 +93,7 @@ sub init {
|
|||||||
if (defined($self->{list_custommode})) {
|
if (defined($self->{list_custommode})) {
|
||||||
$self->list_custommode();
|
$self->list_custommode();
|
||||||
}
|
}
|
||||||
if (defined($self->{sanity_options})) {
|
|
||||||
$self->{options}->set_sanity();
|
$self->{options}->set_sanity();
|
||||||
}
|
|
||||||
|
|
||||||
# Output HELP
|
# Output HELP
|
||||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||||
|
@ -39,7 +39,7 @@ sub new {
|
|||||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||||
'list-mode' => { name => 'list_mode' },
|
'list-mode' => { name => 'list_mode' },
|
||||||
'mode-version:s' => { name => 'mode_version' },
|
'mode-version:s' => { name => 'mode_version' },
|
||||||
'sanity-options' => { name => 'sanity_options' },
|
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
@ -74,9 +74,7 @@ sub init {
|
|||||||
if (defined($self->{list_mode})) {
|
if (defined($self->{list_mode})) {
|
||||||
$self->list_mode();
|
$self->list_mode();
|
||||||
}
|
}
|
||||||
if (defined($self->{sanity_options})) {
|
|
||||||
$self->{options}->set_sanity();
|
$self->{options}->set_sanity();
|
||||||
}
|
|
||||||
|
|
||||||
# Output HELP
|
# Output HELP
|
||||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||||
|
@ -41,7 +41,7 @@ sub new {
|
|||||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||||
'list-mode' => { name => 'list_mode' },
|
'list-mode' => { name => 'list_mode' },
|
||||||
'mode-version:s' => { name => 'mode_version' },
|
'mode-version:s' => { name => 'mode_version' },
|
||||||
'sanity-options' => { name => 'sanity_options' },
|
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
@ -76,9 +76,7 @@ sub init {
|
|||||||
if (defined($self->{list_mode})) {
|
if (defined($self->{list_mode})) {
|
||||||
$self->list_mode();
|
$self->list_mode();
|
||||||
}
|
}
|
||||||
if (defined($self->{sanity_options})) {
|
|
||||||
$self->{options}->set_sanity();
|
$self->{options}->set_sanity();
|
||||||
}
|
|
||||||
|
|
||||||
# Output HELP
|
# Output HELP
|
||||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||||
|
@ -43,7 +43,7 @@ sub new {
|
|||||||
'sqlmode:s' => { name => 'sqlmode_name', default => 'dbi' },
|
'sqlmode:s' => { name => 'sqlmode_name', default => 'dbi' },
|
||||||
'list-sqlmode' => { name => 'list_sqlmode' },
|
'list-sqlmode' => { name => 'list_sqlmode' },
|
||||||
'multiple' => { name => 'multiple' },
|
'multiple' => { name => 'multiple' },
|
||||||
'sanity-options' => { name => 'sanity_options' },
|
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
@ -85,9 +85,7 @@ sub init {
|
|||||||
if (defined($self->{list_sqlmode})) {
|
if (defined($self->{list_sqlmode})) {
|
||||||
$self->list_sqlmode();
|
$self->list_sqlmode();
|
||||||
}
|
}
|
||||||
if (defined($self->{sanity_options})) {
|
|
||||||
$self->{options}->set_sanity();
|
$self->{options}->set_sanity();
|
||||||
}
|
|
||||||
|
|
||||||
# Output HELP
|
# Output HELP
|
||||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||||
|
@ -41,7 +41,7 @@ sub new {
|
|||||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||||
'list-mode' => { name => 'list_mode' },
|
'list-mode' => { name => 'list_mode' },
|
||||||
'mode-version:s' => { name => 'mode_version' },
|
'mode-version:s' => { name => 'mode_version' },
|
||||||
'sanity-options' => { name => 'sanity_options' },
|
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
@ -76,9 +76,7 @@ sub init {
|
|||||||
if (defined($self->{list_mode})) {
|
if (defined($self->{list_mode})) {
|
||||||
$self->list_mode();
|
$self->list_mode();
|
||||||
}
|
}
|
||||||
if (defined($self->{sanity_options})) {
|
|
||||||
$self->{options}->set_sanity();
|
$self->{options}->set_sanity();
|
||||||
}
|
|
||||||
|
|
||||||
# Output HELP
|
# Output HELP
|
||||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||||
|
@ -557,15 +557,6 @@ The mapping between 'snmpwalk' options and "centreon-plugins" options:
|
|||||||
Miscellaneous
|
Miscellaneous
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
I use an option but it doesn't seem to work
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Before opening a ticket on the github, please use the option ``--sanity-options``. It checks if you have misspell an option:
|
|
||||||
::
|
|
||||||
|
|
||||||
$ perl centreon_plugins.pl --plugin=os::linux::snmp::plugin --mode=traffic --hostname=127.0.0.1 --snmp-version=2c --snmp-community=public --interface='.*' --name --regex --verbose --skip --skip-speed0 --sanity-options
|
|
||||||
Unknown option: regex
|
|
||||||
|
|
||||||
I get the error: "UNKNOWN: Need to specify '--custommode'."
|
I get the error: "UNKNOWN: Need to specify '--custommode'."
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -557,15 +557,6 @@ L'association entre les options 'snmpwalk' et les options "centreon-plugins" :
|
|||||||
Divers
|
Divers
|
||||||
------
|
------
|
||||||
|
|
||||||
J'utilise une options mais il semblerait qu'elle ne fonctionne pas
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Avant d'ouvrir un ticket sur github, utilisez l'option ``--sanity-options``. Cela vérifie si vous avez mal orthographié une option :
|
|
||||||
::
|
|
||||||
|
|
||||||
$ perl centreon_plugins.pl --plugin=os::linux::snmp::plugin --mode=traffic --hostname=127.0.0.1 --snmp-version=2c --snmp-community=public --interface='.*' --name --regex --verbose --skip --skip-speed0 --sanity-options
|
|
||||||
Unknown option: regex
|
|
||||||
|
|
||||||
J'ai l'erreur: "UNKNOWN: Need to specify '--custommode'."
|
J'ai l'erreur: "UNKNOWN: Need to specify '--custommode'."
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user