How to Disable com. netflix. servo. distribute. jmxmetricpoller Using log4j2. yml
How to Eliminate com. netflix. servo. publish. jmxmetricpoller through log4j2. yml
Introduction
The com. netflix. servo. publish. jmxmetricpoller is usually a JMX metric poller that is used by this Netflix Servo checking library to collect metrics from some sort of Java application. Inside some cases, you may want to disable this poller, for example, in the event that you are using a different checking solution or if you are going through performance issues.
Disabling this poller using log4j2. yml
One way to disable the com. netflix. servo. publish. jmxmetricpoller is to use typically the log4j2 logging framework. Log4j2 allows an individual to configure typically the logging level regarding individual classes or even packages, and anyone can use this kind of to disable typically the logging for this possuindo. netflix. servo. distribute. jmxmetricpoller class.
To do this particular, add the next configuration to your log4j2. yml record:
logging: level: com. netflix. servo. submit. jmxmetricpoller: OFF This will disable all logging for this contendo. netflix. servo. publish. jmxmetricpoller class, including typically the logging that is used to start the poller. Seeing that a result, the poller will not be started and even will not gather any metrics.
Disabling the particular poller using a new system property
Another means to disable the apresentando. netflix. servo. submit. jmxmetricpoller is to established the servo. jmx. enabled technique property to false . This will prevent the poller by being started, actually if logging is definitely enabled for this contendo. netflix. servo. publish. jmxmetricpoller class.
To set this system property, an individual can use the following command:
coffee -Dservo. jmx. enabled=false... You can in addition set the program property in your own code, using the particular following code:
Technique. setProperty("servo. jmx. enabled", "false"); Conclusion
Disabling this contendo. netflix. servo. distribute. jmxmetricpoller can be valuable in certain conditions, such as when you are using a different checking solution or when you are encountering performance issues. A person can disable the poller using log4j2. yml or by setting the servo. jmx. enabled system property.