Reputation: 3345
I would like to extract kafka metrics and found that this could be done through JMX using jconsole. But I need to create a programmatical way in order to this and thought that nifi would be a great way to consume these metrics, but cannot find a process that does this. Would someone suggest a way to do this or confirm there is no way to do this with nifi? If not can someone please provide suggestions on how to do this or links to examples?
Upvotes: 0
Views: 260
Reputation: 14194
I would recommend investigating performing JMX over HTTP operations. There is a library called Jolokia which exposes JMX features using JSON over HTTP (here is a blog post describing one developer's approach). You could use InvokeHTTP
processors to make these calls, or if you need to bundle multiple calls into logical atomic units, you could use ExecuteScript
processors. You could also potentially write a custom Controller Service or Reporting Task which provided this service to multiple components.
Upvotes: 2