From 2d6ae2faecd6527fedda435c12290bb395496ed9 Mon Sep 17 00:00:00 2001 From: Chisu Yu Date: Mon, 18 Mar 2013 07:13:30 +0000 Subject: [PATCH] =?UTF-8?q?[=EC=9C=A0=EC=B9=98=EC=88=98]=20[NOBTS]=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=EB=A7=B5=EC=97=90=EC=84=9C=20hostname?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EA=B0=9C=EC=84=A0.=20agentinfo=EB=8A=94?= =?UTF-8?q?=20ip=EC=99=80=20hostname=EC=9D=84=20=EC=88=98=EC=A7=91?= =?UTF-8?q?=ED=95=98=EA=B3=A0=20view=EC=97=90=EC=84=9C=EB=8A=94=20=20hostn?= =?UTF-8?q?ame=EC=9D=84=20=EC=A1=B0=ED=9A=8C=ED=95=B4=EC=84=9C=20=EB=B3=B4?= =?UTF-8?q?=EC=97=AC=EC=A4=80=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1340 84d0f5b1-2673-498c-a247-62c4ff18d310 --- runscript/hippo.config | 3 ++- src/main/java/com/profiler/Agent.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/runscript/hippo.config b/runscript/hippo.config index 476594e01..d3e5194de 100644 --- a/runscript/hippo.config +++ b/runscript/hippo.config @@ -15,7 +15,8 @@ profile.jdbc.dbcp=true profile.jvm.collect.interval=1000 #web view 테스트용. 나중에 필요하면 정규식형태로 바꿔도 되고 필요 없으면 삭제. -profile.include=com.nhn.hippo.testweb.controller.*,com.nhn.hippo.testweb.repository.*,com.nhn.hippo.testweb.util.HttpInvoker +#profile.include=com.nhn.hippo.testweb.controller.*,com.nhn.hippo.testweb.repository.*,com.nhn.hippo.testweb.util.HttpInvoker +profile.include=com.nhn.hippo.testweb.controller.* #timebase 샘플링을 할지 말지 여부 결정. sampling.elapsedtimebase.enable=true diff --git a/src/main/java/com/profiler/Agent.java b/src/main/java/com/profiler/Agent.java index 74c7a7c7b..7a5b43bad 100644 --- a/src/main/java/com/profiler/Agent.java +++ b/src/main/java/com/profiler/Agent.java @@ -32,6 +32,7 @@ public class Agent implements Runnable { private DataSender priorityDataSender; private DataSender dataSender; + private final String machineName; private final String agentId; private final String nodeName; private final String applicationName; @@ -83,7 +84,7 @@ public class Agent implements Runnable { // TODO 일단 임시로 호환성을 위해 agentid에 machinename을 넣도록 하자 // TODO 박스 하나에 서버 인스턴스를 여러개 실행할 때에 문제가 될 수 있음. - String machineName = NetworkUtils.getMachineName(); + this.machineName = NetworkUtils.getMachineName(); this.agentId = getId("hippo.agentId", machineName, HBaseTables.AGENT_NAME_MAX_LEN); this.nodeName = System.getProperty("hippo.nodeName", machineName); this.applicationName = getId("hippo.applicationName", "UnknownApplicationName", HBaseTables.APPLICATION_NAME_MAX_LEN); @@ -124,7 +125,8 @@ public class Agent implements Runnable { AgentInfo agentInfo = new AgentInfo(); - agentInfo.setHostname(ip); + agentInfo.setIp(ip); + agentInfo.setHostname(this.machineName); agentInfo.setPorts(ports); agentInfo.setAgentId(getAgentId());