JMX: Don't use node id and name as part of the jmx registration, use static org.elasticsearch, closes #843.

This commit is contained in:
kimchy 2011-04-08 18:49:40 +03:00
parent 388f4febba
commit b71513a072
1 changed files with 2 additions and 9 deletions

View File

@ -78,7 +78,7 @@ public class JmxService {
this.logger = logger;
this.settings = settings;
this.jmxDomain = settings.get("jmx.domain", "{elasticsearch}");
this.jmxDomain = settings.get("jmx.domain", "org.elasticsearch");
this.mBeanServer = ManagementFactory.getPlatformMBeanServer();
}
@ -237,13 +237,6 @@ public class JmxService {
}
private String getObjectName(String jmxDomain, String resourceName) {
String type;
if (settings.get("name") != null) {
type = settings.get("name") + " [" + nodeDescription + "]";
} else {
type = nodeDescription;
}
type = type.replace(':', '_').replace('/', '_').replace('.', '_').replace(',', ' ').replace('\"', ' ');
return jmxDomain + ":" + "type=" + type + "," + resourceName;
return jmxDomain + ":" + resourceName;
}
}