Issues in monitoring the Java Heap Memory
Posted: Thu Mar 29, 2018 3:59 am
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.
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.