NOTE: This repo is part of my analysis of the weave cloud product (notes).
While testing the new online service cloud.weave.works (to forward prometheus data), I found this new configuration that we needed to add to the prometheus.yml:
remote_write:
url: https://cloud.weave.works/api/prom/push
basic_auth:
<token>
You can find more in the prom docs.
Unfortunately it isn't working with a test prometheus on my local mac. To be sure it wasn't a prom problem I found out a way to test the functionality via a fake receiver server.
The go server code is in the /code directory and it has not been changed.
To allow the prometheus docker installation to see the server, I put the code in another docker and connected the two. You can test with the docker-compose command.
Data will be printed on the shell you run the command into.
In my case:
docker build -t jecnua/prom-remoteserver .
NOTE: If you want to take a peek inside remember that Alpine doesn't have netstat. Use ss (e.s.: ss -tl)
docker-compose up
Tested on:
- MacOSX Sierra
- Docker for mac Version 1.12.3-beta29.3 (13640) / Channel: Beta 619507e27c
I am not an expert on docker, I am actually just starting to play with it. For any advice or comments feel free to send me an email :) I don't bite. Please reference this repo or I could get it as recruiters spam. ^^
- Makefile copied and slightly modified from microscling
- Go server repo