enhance indent

This commit is contained in:
garnier-quentin 2019-10-25 14:21:57 +02:00
parent 982161aed8
commit 7066ccf005
6 changed files with 19 additions and 19 deletions

View File

@ -38,7 +38,7 @@ sub new {
$options{output}->add_option_msg(short_msg => "Class Custom: Need to specify 'options' argument.");
$options{output}->option_exit();
}
if (!defined($options{noptions})) {
$options{options}->add_options(arguments => {
'hostname:s' => { name => 'hostname' },
@ -106,7 +106,7 @@ sub get_hostname {
##############
sub execute_command {
my ($self, %options) = @_;
$self->{ssh_commands} =
"set cli op-command-xml-output on\n" .
$options{command} . "\n";

View File

@ -27,13 +27,13 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(?:psu|temperature|voltage)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature|voltage)$';
$self->{cb_hook2} = 'ssh_execute';
$self->{thresholds} = {
default => [
['false', 'OK'],
@ -49,7 +49,7 @@ sub set_system {
sub ssh_execute {
my ($self, %options) = @_;
($self->{results}, $self->{exit_code}) = $options{custom}->execute_command(
command => 'show system environmentals',
);
@ -59,7 +59,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});

View File

@ -140,7 +140,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'unknown-member-status:s' => { name => 'unknown_member_status', default => '' },
'warning-member-status:s' => { name => 'warning_member_status', default => '' },
@ -159,7 +159,7 @@ sub new {
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->change_macros(
macros => [
'unknown_sync_status', 'warning_sync_status', 'critical_sync_status',

View File

@ -79,7 +79,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'unknown-status:s' => { name => 'unknown_status', default => '' },
@ -93,7 +93,7 @@ sub new {
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->change_macros(
macros => [
'unknown_status', 'warning_status', 'critical_status'

View File

@ -30,14 +30,14 @@ use centreon::plugins::misc;
sub custom_status_output {
my ($self, %options) = @_;
my $msg = 'system operational mode: ' . $self->{result_values}->{oper_mode};
return $msg;
}
sub custom_av_output {
my ($self, %options) = @_;
return sprintf(
"antivirus version '%s', last update %s",
$self->{result_values}->{av_version_absolute},
@ -47,7 +47,7 @@ sub custom_av_output {
sub custom_threat_output {
my ($self, %options) = @_;
return sprintf(
"threat version '%s', last update %s",
$self->{result_values}->{threat_version_absolute},
@ -57,11 +57,11 @@ sub custom_threat_output {
sub set_counters {
my ($self, %options) = @_;
$self->{maps_counters_type} = [
{ name => 'system', type => 0, message_separator => ' - ' }
];
$self->{maps_counters}->{system} = [
{ label => 'status', threshold => 0, set => {
key_values => [ { name => 'oper_mode' } ],
@ -94,7 +94,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{oper_mode} !~ /normal/i' },

View File

@ -79,7 +79,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'unknown-status:s' => { name => 'unknown_status', default => '' },
'warning-status:s' => { name => 'warning_status', default => '' },
@ -92,7 +92,7 @@ sub new {
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->change_macros(
macros => [
'unknown_status', 'warning_status', 'critical_status'