0

For instance am trying to get the connected user count from this API

The return json looks like, enter image description here

If I want to grab the user_count and send it to data visualization platform like datadog or prometheus, is writing a custom exporter that polls at a certain interval and grabs the value, converts it to a metric(like gauge or counter) the only option to accomplish this?

Or is there a better way to do this integration that I might be missing?

2
  • Not sure why there is a negative vote on this question? Dec 13, 2022 at 14:32
  • "Is writing a custom exporter that polls at a certain interval and grabs the value [...] the only option to accomplish this?" Pretty much. But don't poll on your own interval if you can help it. Getting up-to-date data for every scrape is preferrable. In Go, it boils down to implementing the Collector interface and then registering an instance of the Collector.
    – Peter
    Dec 13, 2022 at 14:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.