I am working on custom monitoring system to my server.
the application is developed using python and Django.
The server is running java web applications and I need to monitor the JVM under which the application server is running, so I start the applications with enable the JMX.
Now I need to connect my python application to the JVM JMX agent.
Is there any way to get that?
I have read about the HtmlAdapterServer, that enable managing JMX MBeans from specific url but I do not know how can I use it?
Thanks in advance and best regards
To connect JConsole to server process, in the Remote Process section, specify the URL service:jmx:rmi:///jndi/rmi://localhost:2047/fmq and credentials pertaining to the server. Default user name and password are admin and passwd respectively.
A common way to enable local JMX access on these JVMs is to include the -Dcom. sun. management. jmxremote option on the command line when you start the JVM.
The JMX connection will appear in the application tree, with a special JMX connection icon. Right click on the JMX connection, and select Open. The JVM software exposed via the JMX connection can now be monitored and managed via Java VisualVM.
How about using Jython ? http://www.jython.org/
There is a reference implementation of a WebServices based JMXServer you can deploy on your server. Based on the docs, it is possible to use VB Scripting to invoke JMX operations, so I would assume you could use Python too.
Update:
Jolokia provides an HTTP/REST API to access JMX MBeanServers. This should be easily invoked by a python client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With