Skip to content
Snippets Groups Projects
Unverified Commit c50e8531 authored by Oliver's avatar Oliver Committed by GitHub
Browse files

Documentation (#224)

* run instructions

* add link to sample redis file
parent aea951d0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,7 +7,7 @@ Supports Redis 2.x, 3.x, 4.x, and 5.x
 
## Building, configuring, and running
 
Locally build and run it:
### Build and run locally:
 
```sh
$ go get github.com/oliver006/redis_exporter
Loading
Loading
@@ -16,12 +16,8 @@ Locally build and run it:
$ ./redis_exporter <flags>
```
 
You can also run it via docker:
 
```sh
$ docker pull oliver006/redis_exporter
$ docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter
```
### Prometheus Configuration
 
Add a block to the `scrape_configs` of your prometheus.yml config file:
 
Loading
Loading
@@ -39,16 +35,29 @@ scrape_configs:
 
and adjust the host name accordingly.
 
To run on Cloud Foundry, use:
### Run via Docker:
The latest release is automatically published to the [Docker registry](https://hub.docker.com/r/oliver006/redis_exporter/).
You can run it like this:
 
```sh
cf push -f contrib/manifest.yml
$ docker pull oliver006/redis_exporter
$ docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter
```
The `latest` docker image contains only the exporter binary.
If, e.g. for debugging purposes, you need the exporter running
in an image that has a shell, etc then you can run the `alpine` image:
```sh
$ docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter:alpine
```
 
### Run on Kubernetes
 
[Here](contrib/k8s-redis-and-exporter-deployment.yaml) is an example Kubernetes deployment configuration for how to deploy the redis_exporter as a sidecar with a Redis instance.
 
### Run on Openshift
 
In order to deploy the exporter on Openshift environment.
Loading
Loading
@@ -86,6 +95,14 @@ scrape_configs:
...
```
 
### Run on Cloud Foundry
```sh
cf push -f contrib/manifest.yml
```
### Flags
 
Name | Description
Loading
Loading
@@ -98,7 +115,7 @@ script | Path to Redis Lua script for gathering extra metrics.
redis.addr | Address of one or more redis nodes, comma separated, defaults to `redis://localhost:6379`.
redis.password | Password to use when authenticating to Redis
redis.alias | Alias for redis node addr, comma separated.
redis.file | Path to file containing one or more redis nodes, separated by newline. This option is mutually exclusive with redis.addr. Each line can optionally be comma-separated with the fields `<addr>,<password>,<alias>`.
redis.file | Path to file containing one or more redis nodes, separated by newline. This option is mutually exclusive with redis.addr. Each line can optionally be comma-separated with the fields `<addr>,<password>,<alias>`. See [here](./contrib/sample_redis_hosts_file.txt) for an example file.
namespace | Namespace for the metrics, defaults to `redis`.
web.listen-address | Address to listen on for web interface and telemetry, defaults to `0.0.0.0:9121`.
web.telemetry-path | Path under which to expose metrics, defaults to `metrics`.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment