The option -Dhazelcast.jmx=true
seems to have no effect if I connect to the cluster as a cient:
hzInstance = HazelcastClient.newHazelcastClient(clientConfig);
It works in server mode. What am I doing wrong?
As per the documentation:
You can monitor your Hazelcast members via the JMX protocol
Emphasis mine. As such, you can only get the JMX metrics on a server JVM, from the Hazelcast node it's running.