How to Disable possuindo. netflix. servo. distribute. jmxmetricpoller Using log4j2. yml
How to Deactivate com. netflix. servo. publish. jmxmetricpoller through log4j2. yml
Introduction
The com. netflix. servo. publish. jmxmetricpoller is usually a JMX metric poller that will be used by this Netflix Servo monitoring library to gather metrics from a Java application. Inside some cases, a person may want to disable this poller, for example, in case you are applying a different overseeing solution or if you are encountering performance issues.
Disabling this poller using log4j2. yml
One way to disable the com. netflix. servo. publish. jmxmetricpoller will be to use the log4j2 logging structure. Log4j2 allows anyone to configure the particular logging level with regard to individual classes or maybe packages, and you can use this specific to disable this logging for this possuindo. netflix. servo. distribute. jmxmetricpoller class.
To do this specific, add the pursuing configuration to the log4j2. yml document:
logging: level: possuindo. netflix. servo. post. jmxmetricpoller: OFF This specific will disable almost all logging for the apresentando. netflix. servo. publish. jmxmetricpoller class, including this logging that will be used to start the poller. While a result, the particular poller will not really be started and will not collect any metrics.
Disabling this poller using a system property
Another approach to disable the apresentando. netflix. servo. publish. jmxmetricpoller is to established the servo. jmx. allowed method property to false . This will stop the poller coming from being started, also if logging is enabled for the contendo. netflix. servo. distribute. jmxmetricpoller class.
To set this system property, you can use the following command:
espresso -Dservo. jmx. enabled=false... You can in addition set the system property in the code, using the particular following code:
Program. setProperty("servo. jmx. enabled", "false"); Conclusion
Disabling this com. netflix. servo. publish. jmxmetricpoller can be helpful in certain situations, such as when you are making a different supervising solution or when you are encountering performance issues. A person can disable this poller using log4j2. yml or by means of setting the servo. jmx. enabled system property.