If anyone is interested… I couldn’t get 1.2.8p26 to work correctly. However, I did get 1.6.0p23.cre to work.
Clearly there are some undocumented tricks. You can do 2 types of searches from the config file.
The normal is just for 1 Attribute like this:
(‘java.lang:type=OperatingSystem’, ‘OpenFileDescriptorCount’, ‘Open File Descriptors’, , False, ‘number’ ),
but you can also do a ‘search’ for matching Attributes
The items in the were the the same from the mk_jolokia.py file - [“path”, “context”]
And I used that example to make it work in the config file:
“tomcat”: [
(“:type=Manager,”, “activeSessions,maxActiveSessions”, None, [“path”, “context”], False),
One issue I encountered was that my ObjectName had 2 “/” in it, and it wouldn’t work calling out a direct attribute, but the search worked. That left me with a really ugly name that was passed to CMK.
So I ended up adding a few search and replace lines in the “def _process_queries(inst, queries):” sub of the mk_jolokia.py file.
def _process_queries(inst, queries):
for mbean_path, title, itemspec in queries:
try:
for item, out_title, value in fetch_metric(inst, mbean_path, title, itemspec):
item = item.replace(r'TEXT-OUTPUT-YOU-HATE', ' SOME-OTHER-TEXT-OUTPUT')
yield item, out_title, value
except (IOError, socket.timeout):
raise SkipInstance()
except SkipMBean:
continue
except () if DEBUG else Exception:
continue
Kinda of a hack, but seems to work good.