diff --git a/plugins/jenkins/jenkins_nodes_ b/plugins/jenkins/jenkins_nodes_ old mode 100644 new mode 100755 index 8293caed..595e7f96 --- a/plugins/jenkins/jenkins_nodes_ +++ b/plugins/jenkins/jenkins_nodes_ @@ -51,7 +51,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/computer/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { my $cat = $cur->{'displayName'}; $cat =~ s/\./\_/g; if( $lcount > 0 ){ @@ -77,7 +77,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/computer/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { my $cat = $cur->{'displayName'}; $cat =~ s/\./\_/g; if( $lcount > 0 ){ @@ -103,7 +103,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/computer/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { my $cat = $cur->{'displayName'}; $cat =~ s/\./\_/g; if( $lcount > 0 ){ @@ -130,7 +130,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my %archs = (); my $cat; foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { $cat = $cur->{'monitorData'}{'hudson.node_monitors.ArchitectureMonitor'}; if (exists $archs{$cat} ) {} else { $archs{$cat} = 0; @@ -178,7 +178,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $total_mem = 0; my $used_mem = 0; foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { $monitor = $cur->{'monitorData'}{'hudson.node_monitors.SwapSpaceMonitor'}; $avail_mem += $monitor->{'availablePhysicalMemory'}; $total_mem += $monitor->{'totalPhysicalMemory'}; @@ -193,7 +193,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/computer/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { $monitor = $cur->{'monitorData'}{'hudson.node_monitors.SwapSpaceMonitor'}; my $cat = $cur->{'displayName'}; $cat =~ s/\./\_/g; @@ -206,7 +206,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/computer/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { $monitor = $cur->{'monitorData'}{'hudson.node_monitors.TemporarySpaceMonitor'}; my $cat = $cur->{'displayName'}; $cat =~ s/\./\_/g; @@ -219,7 +219,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/computer/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { $monitor = $cur->{'monitorData'}{'hudson.node_monitors.DiskSpaceMonitor'}; my $cat = $cur->{'displayName'}; $cat =~ s/\./\_/g; @@ -233,7 +233,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my %archs = (); my $cat; foreach my $cur(@{$parsed->{'computer'}}) { - if( $cur->{'offline'} =~ /false$/ ) { + if( !$cur->{'offline'} ) { $cat = $cur->{'monitorData'}{'hudson.node_monitors.ArchitectureMonitor'}; if (exists $archs{$cat} ) { $archs{$cat} += 1;