diff --git a/scripts/server/jmxproxy.yml b/scripts/server/jmxproxy.yml index 4f348d7..159d81d 100644 --- a/scripts/server/jmxproxy.yml +++ b/scripts/server/jmxproxy.yml @@ -1,6 +1,7 @@ jmxproxy: allowed_endpoints: - 'localhost:1123' + history_size: 20 logging: level: INFO diff --git a/src/main/java/com/topsy/jmxproxy/JMXProxyConfiguration.java b/src/main/java/com/topsy/jmxproxy/JMXProxyConfiguration.java index 8dcb259..6b1d6c1 100644 --- a/src/main/java/com/topsy/jmxproxy/JMXProxyConfiguration.java +++ b/src/main/java/com/topsy/jmxproxy/JMXProxyConfiguration.java @@ -28,6 +28,10 @@ public static class JMXProxyApplicationConfiguration { @JsonProperty private long accessDuration = 30; + @Min(1) + @JsonProperty + private int historySize = 1; + @JsonProperty private List allowedEndpoints = new ArrayList(); @@ -52,6 +56,13 @@ public void setAccessDuration(long accessDuration) { this.accessDuration = accessDuration; } + public int getHistorySize() { + return historySize; + } + public void setHistorySize(int historySize) { + this.historySize = historySize; + } + public List getAllowedEndpoints() { return allowedEndpoints; }