简体   繁体   中英

Mesos java Application Monitoring

I am running a java application on Mesos and Marathon. How do i monitor the heap stats of the java process? I tried jstat which complains "pid not found", but the process is running and i can check it by 'ps auwx'. Is this because the java process is running inside a cgroup? If that is the case how do we monitor mesos based applications.

The best option to monitor application is to publish it's metrics from itself. There are plenty of ways to add monitoring to your application starting from proprietarty such as NewRelic or DataDog to opensource Prometheus .

If you need to get acces via JMX you can expose this port with following configuration:

-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.local.only=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.port=$PORT1 \
-Djava.rmi.server.hostname=$MESOS_HOSTNAME

Above configuration assume you have two ports and second is dedicated for JMX

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM