Skip to content

Commit

Permalink
Merge pull request #398 from ddh27/master
Browse files Browse the repository at this point in the history
Custom metrics display updates
  • Loading branch information
zxy0728 authored Sep 14, 2018
2 parents 46cb891 + 086b274 commit 2950e06
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -121,6 +122,18 @@ public void run() {
}
}

// up to date SystemProperties
String getSysUrl = this.appServerInfo.getJVMAccessURL() + "jvm?action=getSystemPro";
String data = accessData(getSysUrl, null);
@SuppressWarnings("unchecked")
Map<String, String> p = JSONHelper.toObject(data, Map.class);

Properties sysPro = new Properties();
if (!p.isEmpty()) {
sysPro.putAll(p);
this.appServerInfo.setSystemProperties(sysPro);
}

// get all profile's MBean
MonitorDataFrame pmdf = new MonitorDataFrame(this.getWorkerId(), "P", timeFlag);
pmdf.addExt("pid", pid);
Expand Down Expand Up @@ -153,6 +166,9 @@ public void run() {
// if connect fails, try process detecting
doHealthReaction();
}
catch (Exception e) {
log.err(this, "up to date SystemProperties failed", e);
}
}

/**
Expand Down

0 comments on commit 2950e06

Please sign in to comment.