Add example on how to update prometheus targets#67
Add example on how to update prometheus targets#67ecksun wants to merge 1 commit intoprometheus-community:masterfrom
Conversation
No need for jq, you can do this with relabelling on the Prometheus side. A curl in a cronjob doesn't really need an example including a debian package. |
How would you do that? could you give an example? :)
Agreed, removed it |
a1eb2df to
8d478f3
Compare
A replace action to append a port number. |
Hmm, I have been trying to do this for a while now but can't figure out how to expand one target ( Did you actually mean simply doing |
8d478f3 to
147da4d
Compare
Signed-off-by: Linus Wallgren <linus@nectarinehealth.com>
147da4d to
386b832
Compare
|
I revisited this now and I think I figured out what you meant. Perhaps this is a good addition to the README? |

This will build a deb packge (does not follow the debian guidelines)
that can be installed which updates a target list in the format expected
by file_sd_config0 every 20 seconds.
I do not expect all of this to be merged, this is what we will use internally to integrate pushprox with prometheus.
What I have a feeling might be of most interest is the
update.shfile that transforms the pushprox's/clientjson into a json that prometheus understands (given a number of ports to scrape). Secondly the systemd service file might also be of interest.I fully expect this PR to become much smaller (possibly nothing), so don't hesitate to let me know what to throw away :)