2016-08-29 09:48:20 -07:00
|
|
|
## Generic Remote Storage Example
|
|
|
|
|
|
|
|
This is a simple example of how to write a server to
|
|
|
|
receive samples from the remote storage output.
|
|
|
|
|
|
|
|
To use it:
|
|
|
|
|
|
|
|
```
|
|
|
|
go build
|
2017-01-31 08:44:22 -08:00
|
|
|
./example_receiver
|
2016-08-29 09:48:20 -07:00
|
|
|
```
|
|
|
|
|
2016-10-05 08:46:51 -07:00
|
|
|
...and then add the following to your `prometheus.yml`:
|
2016-08-29 09:48:20 -07:00
|
|
|
|
2016-10-05 08:46:51 -07:00
|
|
|
```yaml
|
|
|
|
remote_write:
|
|
|
|
url: "http://localhost:1234/receive"
|
2016-08-29 09:48:20 -07:00
|
|
|
```
|
2016-10-05 08:46:51 -07:00
|
|
|
|
|
|
|
Then start Prometheus:
|
|
|
|
|
|
|
|
```
|
|
|
|
./prometheus
|
2016-08-29 09:48:20 -07:00
|
|
|
```
|