Hi all,
I need to be able to monitor several java processes/instances on the same server. There are 3-4 processes serving different functions for each site that runs on the server.
I found the following: https://support.nagios.com/forum/viewto ... va#p217181
I want to know if monitoring whether the port is being used is the only way, or if it's possible to monitor the process itself, IDENTIFIED by either the port, or the command that started the process.
Thanks in advance for any help or advice!
Monitoring Specific Java instances
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Specific Java instances
I don't know if it will give you exactly what you want, but you can do java objects and attributes with JMX: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Please let us know if that isn't going to work for you.
Please let us know if that isn't going to work for you.
-
InscrutableDude
- Posts: 47
- Joined: Mon Mar 27, 2017 10:19 am
Re: Monitoring Specific Java instances
This looks possible. I will test it on one of our dev or demo servers. Do you maybe have a guide handy for enabling and setting it up?
Re: Monitoring Specific Java instances
Enabling a particular Java application for JMX connections can be done in the system properties at runtime. Otherwise, specific applications (PeopleSoft for example) may natively support it with a separate configuration file.
Here's the official Oracle documentation:
http://docs.oracle.com/javase/7/docs/te ... agent.html
Here's the official Oracle documentation:
http://docs.oracle.com/javase/7/docs/te ... agent.html
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
InscrutableDude
- Posts: 47
- Joined: Mon Mar 27, 2017 10:19 am
Re: Monitoring Specific Java instances
Hi,
It took me a while, and interfacing with our Java team, but I got the monitoring up and running, and it's great. And there's very little overhead. Further, now they want to know if we can get graphs of performance. I know that JMX itself has this capability, but do we have any plugins that can provide this, or can check_jmx be extended to provide this?
Thanks!
It took me a while, and interfacing with our Java team, but I got the monitoring up and running, and it's great. And there's very little overhead. Further, now they want to know if we can get graphs of performance. I know that JMX itself has this capability, but do we have any plugins that can provide this, or can check_jmx be extended to provide this?
Thanks!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Specific Java instances
As of right now, we do not maintain any of the java checks, so we are not really in a position to extend their capabilities. However, I have put in a feature request at https://github.com/nagios-plugins/nagio ... issues/279
You will see too on that thread that @mcapra has explained what he currently uses. He speaks now independently of Nagios, but as he was our primary Java tech until recently, I have no doubt the usefulness of his answer.
This is not to say others in the community can't chime in on this thread, but expanding this check is not likely something that will happen soon on our end.
You will see too on that thread that @mcapra has explained what he currently uses. He speaks now independently of Nagios, but as he was our primary Java tech until recently, I have no doubt the usefulness of his answer.
This is not to say others in the community can't chime in on this thread, but expanding this check is not likely something that will happen soon on our end.
-
InscrutableDude
- Posts: 47
- Joined: Mon Mar 27, 2017 10:19 am
Re: Monitoring Specific Java instances
Yes, that does look interesting, and I'll be reading through all of it shortly.
His point about enabling JMX directly on the app is a good one. We're in azure, and so don't have to worry about external connections, so all the auth stuff is disabled, we just had to add this string to the end of our app start command to get what we needed:
$projectJMXPort being whatever port we've decided to access the JMX feed on from Nagios for that particular instance.
His point about enabling JMX directly on the app is a good one. We're in azure, and so don't have to worry about external connections, so all the auth stuff is disabled, we just had to add this string to the end of our app start command to get what we needed:
Code: Select all
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$projectJMXPort -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Specific Java instances
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!