Correct example name to adapter. (#2590)

This commit is contained in:
Brian Brazil 2017-04-10 17:24:53 +01:00 committed by GitHub
parent acd72ae1a7
commit 0e0fc5a7f4
14 changed files with 60 additions and 60 deletions

View file

@ -1,4 +1,4 @@
## Generic Remote Storage Example
## Remote Write Adapter Example
This is a simple example of how to write a server to
receive samples from the remote storage output.
@ -7,7 +7,7 @@ To use it:
```
go build
./example_receiver
./example_write_adapter
```
...and then add the following to your `prometheus.yml`:

View file

@ -0,0 +1,55 @@
# Remote storage adapter
This is a write adapter that receives samples via Prometheus's remote write
protocol and stores them in Graphite, InfluxDB, or OpenTSDB. It is meant as a
replacement for the built-in specific remote storage implementations that have
been removed from Prometheus.
For InfluxDB, this binary is also a read adapter that supports reading back
data through Prometheus via Prometheus's remote read protocol.
## Building
```
go build
```
## Running
Graphite example:
```
./remote_storage_adapter -graphite-address=localhost:8080
```
OpenTSDB example:
```
./remote_storage_adapter -opentsdb-url=http://localhost:8081/
```
InfluxDB example:
```
./remote_storage_adapter -influxdb-url=http://localhost:8086/ -influxdb.database=prometheus -influxdb.retention-policy=autogen
```
To show all flags:
```
./remote_storage_adapter -h
```
## Configuring Prometheus
To configure Prometheus to send samples to this binary, add the following to your `prometheus.yml`:
```yaml
# Remote write configuration (for Graphite, OpenTSDB, or InfluxDB).
remote_write:
- url: "http://localhost:9201/write"
# Remote read configuration (for InfluxDB only at the moment).
remote_read:
- url: "http://localhost:9201/read"
```

View file

@ -33,9 +33,9 @@ import (
influx "github.com/influxdata/influxdb/client/v2"
"github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_bridge/graphite"
"github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_bridge/influxdb"
"github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_bridge/opentsdb"
"github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/graphite"
"github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/influxdb"
"github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/opentsdb"
"github.com/prometheus/prometheus/storage/remote"
)

View file

@ -1,55 +0,0 @@
# Remote storage bridge
This is a bridge that receives samples via Prometheus's remote write
protocol and stores them in Graphite, InfluxDB, or OpenTSDB. It is meant
as a replacement for the built-in specific remote storage implementations
that have been removed from Prometheus.
For InfluxDB, this bridge also supports reading back data through
Prometheus via Prometheus's remote read protocol.
## Building
```
go build
```
## Running
Graphite example:
```
./remote_storage_bridge -graphite-address=localhost:8080
```
OpenTSDB example:
```
./remote_storage_bridge -opentsdb-url=http://localhost:8081/
```
InfluxDB example:
```
./remote_storage_bridge -influxdb-url=http://localhost:8086/ -influxdb.database=prometheus -influxdb.retention-policy=autogen
```
To show all flags:
```
./remote_storage_bridge -h
```
## Configuring Prometheus
To configure Prometheus to send samples to this bridge, add the following to your `prometheus.yml`:
```yaml
# Remote write configuration (for Graphite, OpenTSDB, or InfluxDB).
remote_write:
- url: "http://localhost:9201/write"
# Remote read configuration (for InfluxDB only at the moment).
remote_read:
- url: "http://localhost:9201/read"
```