public class SolrJmxReporter extends FilteringSolrMetricReporter
SolrMetricReporter that finds (or creates) a MBeanServer from
the given configuration and registers metrics to it with JMX.
NOTE: JmxReporter that this class uses exports only newly added metrics (it doesn't
process already existing metrics in a registry)
filtersenabled, metricManager, period, pluginInfo, registryName| Constructor and Description |
|---|
SolrJmxReporter(SolrMetricManager metricManager,
String registryName)
Creates a new instance of
SolrJmxReporter. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stops the reporter from publishing metrics.
|
protected void |
doInit()
Reporter initialization implementation.
|
String |
getAgentId()
Return configured agentId or null.
|
String |
getDomain()
Return configured domain or null.
|
String |
getInstanceTag()
For unit tests.
|
MBeanServer |
getMBeanServer()
Return the reporter's MBeanServer.
|
String |
getServiceUrl()
Return configured serviceUrl or null.
|
boolean |
isActive()
For unit tests.
|
boolean |
isStarted()
For unit tests.
|
void |
setAgentId(String agentId)
Sets the agent id for a JMX server.
|
void |
setDomain(String domain)
Sets the domain with which MBeans are published.
|
void |
setRootName(String rootName)
Set root name of the JMX hierarchy for this reporter.
|
void |
setServiceUrl(String serviceUrl)
Sets the service url for a JMX server.
|
String |
toString() |
protected void |
validate()
Validates that the reporter has been correctly configured.
|
newMetricFilter, setFilter, setFiltergetPeriod, getPluginInfo, init, setEnabled, setPeriodpublic SolrJmxReporter(SolrMetricManager metricManager, String registryName)
SolrJmxReporter.registryName - name of the registry to reportprotected void doInit()
SolrMetricReporterdoInit in class SolrMetricReporterpublic String getInstanceTag()
public void close()
protected void validate()
throws IllegalStateException
validate in class SolrMetricReporterIllegalStateException - if the reporter is not properly configuredpublic void setRootName(String rootName)
rootName - root name of the JMX name hierarchy, or null or empty for default.public void setDomain(String domain)
domain - the domainpublic void setServiceUrl(String serviceUrl)
serviceUrl - the service urlpublic void setAgentId(String agentId)
agentId - the agent idpublic String getAgentId()
public String getServiceUrl()
public String getDomain()
public MBeanServer getMBeanServer()
public boolean isActive()
public boolean isStarted()
public String toString()
toString in class SolrMetricReporterCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.