5

Is it possible to query some/any data from the jmx port using curl? I am writing an inspec(chef) test to check that jmx is working fine.

# curl https://localhost:9114
curl: (35) Encountered end of file

# curl -s -w "%{http_code}\n" https://localhost:9114 -o /dev/null
000

Simply doing curl doesn't return anything useful.

Thanks for reading.

user674669
  • 10,681
  • 15
  • 72
  • 105

1 Answers1

1

from what i understand, you would like to check whether jmx is working; this has nothing to do with chef. at the time of writing, inspec does not have a builtin resource for testing jmx.

consider the following approaches for testing jmx:

  1. use a non-interactive command line tool (not jconsole or any gui) client to jmx. for instance, see jmxterm` and query the jmx as you need
  2. sample the jmx metric and analyze it. for instance, did it pass a certain threshold
Mr.
  • 9,429
  • 13
  • 58
  • 82