Sending data to metrics via Pinger - bus? REST?
by Juraci Paixão Kröhling
With the latest update of metrics, it seems that the Pinger is now
broken: Metrics is now protected via Accounts, meaning that REST calls
would need to include auth data, which are not available to pinger.
Pinger is a process that runs on Hawkular server, so, either we would
need to get a token from users when they first request an URL to be
monitored, or we would need to somehow send data to Metrics "directly".
Of course, the bus comes to my mind. I'm sure this was discussed at
length before, but I just want to catch up on the current state of things.
My understanding is that Pinger would send a "PingerResult" to a topic,
where interested parties would be listening. Inventory and Metrics would
be such parties: a Topic Listener on each of those components would be
responsible for doing inventory-specific and metrics-specific logic.
The question, though, is: where would this code reside? Heiko's idea is
that this would be part of a "glue", ie, a code "somewhere inside
Hawkular". In my view, the glue is the bus, so, this should reside
within the component itself. In metrics case, the listener would
probably be inside the "hawkular-component" module. The code on
"hawkular-component" would just listen to this topic and call
MetricsService.
What would be the most appropriate way to have the pinger's results
stored in metrics?
- Juca.