mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
wip cisco tc + hp oneview (#2185)
This commit is contained in:
parent
884d876549
commit
19b8c73a24
@ -204,6 +204,16 @@ sub manage_selection {
|
|||||||
$self->{channels}->{$_} = { display => $_ };
|
$self->{channels}->{$_} = { display => $_ };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!defined($result->{version}) || $result->{version} !~ /^(?:CE|TC)(\d+\.\d+)/i) {
|
||||||
|
$self->{output}->add_option_msg(short_msg => 'cannot find firmware version');
|
||||||
|
$self->{output}->option_exit();
|
||||||
|
}
|
||||||
|
my ($version_major, $version_minor) = split(/\./, $1);
|
||||||
|
if (($version_major < 8) || ($version_major == 8 && $version_minor < 3)) {
|
||||||
|
$self->{output}->add_option_msg(short_msg => 'firmware version is too old (' . $version_major . '.' . $version_minor . ')');
|
||||||
|
$self->{output}->option_exit();
|
||||||
|
}
|
||||||
|
|
||||||
return if (!defined($result->{MediaChannels}->{Call}));
|
return if (!defined($result->{MediaChannels}->{Call}));
|
||||||
|
|
||||||
foreach my $call (@{$result->{MediaChannels}->{Call}}) {
|
foreach my $call (@{$result->{MediaChannels}->{Call}}) {
|
||||||
|
@ -122,7 +122,7 @@ sub execute_custom {
|
|||||||
my $system_version = 'unknown';
|
my $system_version = 'unknown';
|
||||||
$system_version = $self->{results}->{version} if (defined($self->{results}->{version}));
|
$system_version = $self->{results}->{version} if (defined($self->{results}->{version}));
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => 'system version: ' . $system_version);
|
$self->{output}->output_add(long_msg => 'firmware version: ' . $system_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -37,7 +37,7 @@ sub check_subpart {
|
|||||||
|
|
||||||
next if ($self->check_filter(section => 'enclosure.' . $options{section}, instance => $instance));
|
next if ($self->check_filter(section => 'enclosure.' . $options{section}, instance => $instance));
|
||||||
|
|
||||||
my $status = $_->{status};
|
my $status = defined($_->{status}) ? $_->{status} : 'n/a';
|
||||||
$self->{output}->output_add(
|
$self->{output}->output_add(
|
||||||
long_msg => sprintf(
|
long_msg => sprintf(
|
||||||
"enclosure %s '%s' status is '%s' [instance = %s]",
|
"enclosure %s '%s' status is '%s' [instance = %s]",
|
||||||
|
@ -36,7 +36,8 @@ sub set_system {
|
|||||||
['disabled', 'OK'],
|
['disabled', 'OK'],
|
||||||
['critical', 'CRITICAL'],
|
['critical', 'CRITICAL'],
|
||||||
['warning', 'WARNING'],
|
['warning', 'WARNING'],
|
||||||
['unknown', 'UNKNOWN']
|
['unknown', 'UNKNOWN'],
|
||||||
|
['n/a', 'OK']
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user