mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Removed deprecated hadoop command for hdfs
Made hdfs user configurable (FIXME: user plugin.conf)
This commit is contained in:
parent
2771a20fcb
commit
9d5a111982
1 changed files with 3 additions and 2 deletions
|
@ -15,11 +15,12 @@
|
|||
use strict;
|
||||
use File::Basename qw(basename);
|
||||
|
||||
my $type = &getType($0);
|
||||
my $hdfs_user = "hdfs";
|
||||
|
||||
#
|
||||
# main
|
||||
#
|
||||
my $type = &getType($0);
|
||||
if ($ARGV[0]) {
|
||||
if ($ARGV[0] eq "autoconf") {
|
||||
print "yes\n";
|
||||
|
@ -95,7 +96,7 @@ sub getCapacity {
|
|||
}
|
||||
|
||||
sub getStatistics {
|
||||
open(DFSADMIN, "hadoop dfsadmin -report|") || die("Cannot open dfsadmin: $!");
|
||||
open(DFSADMIN, "su $hdfs_user -c 'hdfs dfsadmin -report'|") || die("Cannot open dfsadmin: $!");
|
||||
while(defined(my $line = <DFSADMIN>)) {
|
||||
chomp($line);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue