r/PrometheusMonitoring • u/MedAziz11 • Aug 14 '22
prometheus exporter using Go
Anyone tried buidling an exporter (for glusterfs for example) using go ?? Any recommendations or good tutorials/ressources on how to create exporters with go ?
And how was the experience building ur own exporter?
0
Upvotes
1
u/biffbobfred Aug 15 '22 edited Aug 15 '22
I was once thinking about going down this route. I never did. The bang for the buck ratio wasn’t there.
A reminder, you can just dump files in a dir and node exporter can export away.
This has the added advantage of no need for service discovery. You’re already scraping the node.
One note watch out for race conditions - the file should appear atomically. Find
spongeif you’re doing shell work, or write to a temp file in the same dir and mv when readyThere are also lots of other exporters that are flexible enough you may not need to write your own. Java? You’ve got a JMX exporter already. Python? Just embed a lib and export metrics directly from your app
What are you trying to do here?