Created
October 26, 2012 20:05
-
-
Save alq666/3961144 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/checks/jmx.py b/checks/jmx.py | |
--- a/checks/jmx.py | |
+++ b/checks/jmx.py | |
@@ -474,7 +474,11 @@ class Solr(Jvm): | |
return self.get_metrics() | |
-def testprofiling(): | |
+def test_tomcat(): | |
import logging | |
+ from pprint import pprint as pp | |
tomcat = Tomcat(logging) | |
- print tomcat.check({'tomcat_jmx_instance_1': 'localhost:8090:moncat'}) | |
+ pp(tomcat.check({'tomcat_jmx_instance_1': 'localhost:8090:tacmot'})) | |
+ | |
+if __name__ == "__main__": | |
+ test_tomcat() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you apply this patch to /usr/share/datadog/agent/checks/jmx.py and then run:
you should get something a list of metrics collected. If your JMX port is not 8090, feel free to update the port in the test_tomcat() function.