mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
add few comments
This commit is contained in:
parent
66f2467332
commit
bc9abd0e5b
@ -158,6 +158,7 @@ sub run {
|
||||
$new_datas->{last_timestamp} = time();
|
||||
my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
|
||||
|
||||
# First execution
|
||||
if (!defined($old_timestamp)) {
|
||||
$self->{output}->output_add(severity => 'OK',
|
||||
short_msg => "Buffer creation...");
|
||||
|
@ -177,6 +177,7 @@ sub run {
|
||||
|
||||
if (defined($self->{option_results}->{id}) || defined($self->{option_results}->{name})) {
|
||||
while ( my ($keys,$values) = each(%{$webcontent->{State}})) {
|
||||
# Why not set a variable that contains the state?
|
||||
if ($values eq 'true') {
|
||||
$result = $keys;
|
||||
$containername = $webcontent->{Name};
|
||||
@ -200,6 +201,7 @@ sub run {
|
||||
$containername = $val->{Names}->[0];
|
||||
$containername =~ s/^\///;
|
||||
|
||||
# Thanks to Docker API for the paused state...
|
||||
if (($val->{Status} =~ m/^Up/) && ($val->{Status} =~ m/^(?:(?!Paused).)*$/)) {
|
||||
$result = 'Running';
|
||||
$nbrunning++;
|
||||
|
@ -187,7 +187,7 @@ __END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check Container's image viability
|
||||
Check Container's image viability with a registry
|
||||
|
||||
=over 8
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user