diff --git a/config.conf b/config.conf index 45347b5..af5ca14 100644 --- a/config.conf +++ b/config.conf @@ -1,4 +1,4 @@ -mongo.host=47.91.17.89 +mongo.host=127.0.0.1 mongo.port=18883 mongo.dbname=eventlog mongo.username=tron diff --git a/src/main/java/org/tron/trongeventquery/monitor/MonitorInfo.java b/src/main/java/org/tron/trongeventquery/monitor/MonitorInfo.java index f61dba7..61e14a5 100644 --- a/src/main/java/org/tron/trongeventquery/monitor/MonitorInfo.java +++ b/src/main/java/org/tron/trongeventquery/monitor/MonitorInfo.java @@ -160,8 +160,6 @@ public MonitorInfo setDataInfo(DataInfo data) { public static class DataInfo { private int interval; - private NodeInfo node; - private BlochainInfo blockchain; private NetInfo net; public int getInterval() { @@ -172,25 +170,6 @@ public DataInfo setInterval(int interval) { this.interval = interval; return this; } - - public NodeInfo getNodeInfo() { - return this.node; - } - - public DataInfo setNodeInfo(NodeInfo node) { - this.node = node; - return this; - } - - public DataInfo setBlockInfo(BlochainInfo blockchain) { - this.blockchain = blockchain; - return this; - } - - public BlochainInfo getBlockchainInfo() { - return this.blockchain; - } - public NetInfo getNetInfo() { return this.net; } @@ -200,222 +179,6 @@ public DataInfo setNetInfo(NetInfo net) { return this; } - // node monitor information - public static class NodeInfo { - private String ip; - private int Type; - private int status; - private String version; - private int noUpgradedSRCount; - private List noUpgradedSRList = new ArrayList<>(); - - public String getIp() { - return this.ip; - } - - public NodeInfo setIp(String ip) { - this.ip = ip; - return this; - } - - public int getType() { - return this.Type; - } - - public NodeInfo setType(int Type) { - this.Type = Type; - return this; - } - - public int getStatus() { - return this.status; - } - - public NodeInfo setStatus(int status) { - this.status = status; - return this; - } - - public String getVersion() { - return this.version; - } - - public NodeInfo setVersion(String version) { - this.version = version; - return this; - } - - public int getNoUpgradedSRCount() { - return this.noUpgradedSRCount; - } - - public NodeInfo setNoUpgradedSRCount(int noUpgradedSRCount) { - this.noUpgradedSRCount = noUpgradedSRCount; - return this; - } - - public List getNoUpgradedSRList() { - return this.noUpgradedSRList; - } - - public NodeInfo setNoUpgradedSRList(List noUpgradedSRList) { - this.noUpgradedSRList = noUpgradedSRList; - return this; - } - - public static class NoUpgradedSR { - private String address; - private String url; - - public String getAddress() { - return this.address; - } - - public NoUpgradedSR setAddress(String address) { - this.address = address; - return this; - } - - public String getUrl() { - return this.url; - } - - public NoUpgradedSR setUrl(String url) { - this.url = url; - return this; - } - } - - } - - // blockchain monitor information - public static class BlochainInfo { - private int headBlockNum; - private long headBlockTimestamp; - private String headBlockHash; - private int forkCount; - private int blockProcessTime; - private TPSInfo TPS; - private int TxCacheSize; - private int missTxCount; - - public int getHeadBlockNum() { - return this.headBlockNum; - } - - public BlochainInfo setHeadBlockNum(int headBlockNum) { - this.headBlockNum = headBlockNum; - return this; - } - - public long getHeadBlockTimestamp() { - return this.headBlockTimestamp; - } - - public BlochainInfo setHeadBlockTimestamp(long headBlockTimestamp) { - this.headBlockTimestamp = headBlockTimestamp; - return this; - } - - public String getHeadBlockHash() { - return this.headBlockHash; - } - - public BlochainInfo setHeadBlockHash(String headBlockHash) { - this.headBlockHash = headBlockHash; - return this; - } - - public int getForkCount() { - return this.forkCount; - } - - public BlochainInfo setForkCount(int forkCount) { - this.forkCount = forkCount; - return this; - } - - public int getBlockProcessTime() { - return this.blockProcessTime; - } - - public BlochainInfo setBlockProcessTime(int blockProcessTime) { - this.blockProcessTime = blockProcessTime; - return this; - } - - public TPSInfo getTPS() { - return this.TPS; - } - - public BlochainInfo setTPS(TPSInfo TPS) { - this.TPS = TPS; - return this; - } - - public int getTxCacheSize() { - return this.TxCacheSize; - } - - public BlochainInfo setTxCacheSize(int TxCacheSize) { - this.TxCacheSize = TxCacheSize; - return this; - } - - public int getMissTxCount() { - return this.missTxCount; - } - - public BlochainInfo setMissTxCount(int missTxCount) { - this.missTxCount = missTxCount; - return this; - } - - public static class TPSInfo { - private double meanRate; - private double oneMinuteRate; - private double fiveMinuteRate; - private double fifteenMinuteRate; - - public double getMeanRate() { - return this.meanRate; - } - - public TPSInfo setMeanRate(double meanRate) { - this.meanRate = meanRate; - return this; - } - - public double getOneMinuteRate() { - return this.oneMinuteRate; - } - - public TPSInfo setOneMinuteRate(double oneMinuteRate) { - this.oneMinuteRate = oneMinuteRate; - return this; - } - - public double getFiveMinuteRate() { - return this.fiveMinuteRate; - } - - public TPSInfo setFiveMinuteRate(double fiveMinuteRate) { - this.fiveMinuteRate = fiveMinuteRate; - return this; - } - - public double getFifteenMinuteRate() { - return this.fifteenMinuteRate; - } - - public TPSInfo setFifteenMinuteRate(double fifteenMinuteRate) { - this.fifteenMinuteRate = fifteenMinuteRate; - return this; - } - - } - } - // network monitor information public static class NetInfo { private int errorProtoCount;