2017-04-10 16:24:53 +00:00
|
|
|
## Remote Write Adapter Example
|
2016-08-29 16:48:20 +00:00
|
|
|
|
|
|
|
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-04-10 16:24:53 +00:00
|
|
|
./example_write_adapter
|
2016-08-29 16:48:20 +00:00
|
|
|
```
|
|
|
|
|
2016-10-05 15:46:51 +00:00
|
|
|
...and then add the following to your `prometheus.yml`:
|
2016-08-29 16:48:20 +00:00
|
|
|
|
2016-10-05 15:46:51 +00:00
|
|
|
```yaml
|
|
|
|
remote_write:
|
2017-11-07 20:02:43 +00:00
|
|
|
- url: "http://localhost:1234/receive"
|
2016-08-29 16:48:20 +00:00
|
|
|
```
|
2016-10-05 15:46:51 +00:00
|
|
|
|
|
|
|
Then start Prometheus:
|
|
|
|
|
|
|
|
```
|
|
|
|
./prometheus
|
2016-08-29 16:48:20 +00:00
|
|
|
```
|