1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Docker plugin

Fix autoconf support
This commit is contained in:
Samuel Cantero 2015-10-25 18:04:02 -03:00
parent 6de1145610
commit ae03bc6fb8
2 changed files with 32 additions and 2 deletions

View file

@ -39,7 +39,22 @@ GPLv3
=cut
my @containers = split "\n" , `/usr/bin/docker ps --no-trunc=true`;
my $docker=`which docker`;
if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) {
if ($docker) {
print "yes\n";
exit 0;
}
else{
print "no (Docker has not been found)\n";
exit 0;
}
}
$docker =~ s/\s+$//;
my @containers = split "\n" , `$docker ps --no-trunc=true`;
my $result;
for my $i (1 .. $#containers)

View file

@ -39,7 +39,22 @@ GPLv3
=cut
my @containers = split "\n" , `/usr/bin/docker ps --no-trunc=true`;
my $docker=`which docker`;
if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) {
if ($docker) {
print "yes\n";
exit 0;
}
else{
print "no (Docker has not been found)\n";
exit 0;
}
}
$docker =~ s/\s+$//;
my @containers = split "\n" , `$docker ps --no-trunc=true`;
my $result;
for my $i (1 .. $#containers)