I am trying to use http module to collect jmx metrics instead of the jolokia module because of the lack of wild card in the queries. I am having trouble configuring multiple paths.
Unfortunately, multiple paths are not supported by the http module's json metricset.
What you see in the config example is for the http module's server metricset. This metricset does not query URLs. Instead it opens an http server on the specified port, and can receive input on multiple paths which are used to separate data into different namespaces.
I too want to collect JMX metrics from multiple HTTP endpoints.
As a workaround I have added multiple http module definitions with individual paths, but that results in the mess of having multiple events sent to elasticsearch - which makes it harder to correlate related items.
I believe having multiple paths in the json metricset would require a new feature to be implemented. The github issue tracker suggests to discuss the topic here, first.
My general expectation is that the metrics belonging together are available under one endpoint / path. That is why you have to configure it multiple times. But this does not seem to be the case for you. Can you share a bit more on your data set?
You mentation that you use Http for JMX data. I wonder if this is more an enhancement request that should be handled by JMX. Work is ongoing in JMX to support wildcards.
In our case we use IBM Liberty which provides its own JMX REST Interface - this is different from Jolokia, and does not work nicely if I grab multiple metrics at once - The HTTP Module's JSON parser cannot work with the output in those cases.
So grabbing multiple HTTP Endpoints to include in one Event would be helpful.
Could you open a feature request for this? Alternatively I'm thinking if we should have a module for the above JMX rest interface instead of bending the http module to work for this.
I've now made another attempt at grabbing multiple metrics at once from the IBM Liberty JMX REST Interface. Basically this attempt boiled down to this error message in the published event:
"error": {
"message": "json: cannot unmarshal array into Go value of type map[string]interface {}"
}
The output from the REST request (path: "/IBMJMXConnectorREST/mbeans/WebSphere%3Atype%3DJvmStats/attributes") is this:
So this is a JSON Array, which cannot be unmarshalled. Further researching this, I found that you already fixed this
(Unfortunately this was a day late for the 6.2.3 release, but I'll just wait for 6.2.4 now (or do you have nightlies available somewhere for people too lazy to set up a build env? (i.e. people like me)))
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.