Hi,
I need to monitor java heap memory on one of the servers. I tried 2 scripts for the same. One is check_jstat.sh (https://exchange.nagios.org/directory/P ... at/details) and the other is check_jvm.sh (https://exchange.nagios.org/directory/P ... vm/details).
With check_jstat.sh I can monitor the java heap memory with the pid, but as the pid is not static/stable so this doesn't work and with check_jvm.sh I can monitor the java heap memory from the application/java name, but the issue over here is that I cannot execute this script from the nagios user because the java application is under the oracle user.
This is the error I get if I run the script from nagios user :
[nagios@servername libexec]$ ./check_jvm.sh --name Dweblogic.Name=Portal -k weblogic -p heap -w 100 -c 200
UNKNOWN JVM is running with different username, run this script with UID 500
So, what can be the solution for this? Or is there any other alternative or script to monitor the java heap memory?
Requesting you to help me in this.
--
Thanks,
Sayali.
Issues in monitoring the Java Heap Memory
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Issues in monitoring the Java Heap Memory
it looks to be a permission issue of some sort. this post has some helpful things to look at - https://support.nagios.com/forum/viewto ... 16&t=43925
a work around, would be to use jmx and expose an ip:port to be polled on. then use jmx - https://assets.nagios.com/downloads/nag ... ios-XI.pdf
a work around, would be to use jmx and expose an ip:port to be polled on. then use jmx - https://assets.nagios.com/downloads/nag ... ios-XI.pdf
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues in monitoring the Java Heap Memory
I have to agree with @tacolover101, almost all java monitoring is done through JMX