I have setup Stackdriver, installed the monitoring agent and followed this guide for JVM monitoring https://cloud.google.com/monitoring/agent/plugins/jvm
However I cannot access the JMX metrics from Dataproc, specifically HeapMemoryUsage.
I downloaded jvm-sun-hotspot.conf from the GitHub configuration repository and place it in the directory /opt/stackdriver/collectd/etc/collectd.d/
It asks me to edit downloaded configuration file and replace JMX_PORT by the port on which your JVM is configured to allow JMX connections.
Where do I find this port? Do I need to setup an application to monitor JMX metrics?