MCPcopy Index your code
hub / github.com/RedisTimeSeries/prometheus-redistimeseries-adapter

github.com/RedisTimeSeries/prometheus-redistimeseries-adapter @v0.0.17

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.17 ↗ · + Follow
31 symbols 77 edges 3 files 5 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

license CircleCI GitHub issues Go Report Card

Prometheus-RedisTimeSeries Adapter

Redis TimeSeries Adapter receives Prometheus metrics via the remote write, and writes to Redis with TimeSeries module.

QuickStart

You can tryout the Prometheus-RedisTimeSeries and RedisTimeSeries with Prometheus and Grafana in a single docker compose

cd compose
docker-compose up

Grafana can be accessed on port 3000 (admin:admin) Prometheus on port 9090

Getting Started

to build the project:

make build
cd bin

To send metrics to Redis, provide address in host:port format.

redis-ts-adapter --redis-address localhost:6379

To receive metrics from Prometheus, Add remote write section to prometheus configuration:

remote_write:
  - url: 'http://127.0.0.1:9201/write'

Makefile commands

run tests:

make test

go linting:

make lint

Redis Sentinel

If you have Redis Sentinel set up for high availability redis, use the redis-sentinel flags:

redis-ts-adapter --redis-sentinel-address localhost:26379 --redis-sentinel-master mydb

Additional flags

Print help:

redis-ts-adapter --help

Set log level:

redis-ts-adapter --log.level debug

Set the timeout to use when sending samples to the remote storage:

redis-ts-adapter --send-timeout 60s

Set the listening port for prometheus to send metrics:

redis-ts-adapter --web.listen-address 127.0.0.1:9201

Contributing

Contribution guidelines for this project

Releases

See the releases on this repository.

Contributors

See also the list of contributors who participated in this project.

License

See the LICENSE file for details.

Acknowledgments

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Write
called by 3
cmd/redis-ts-adapter/main.go
NewClient
called by 2
internal/redis_ts/client.go
NewFailoverClient
called by 2
internal/redis_ts/client.go
metricToLabels
called by 2
internal/redis_ts/client.go
metricToKeyName
called by 2
internal/redis_ts/client.go
Name
called by 2
cmd/redis-ts-adapter/main.go
Read
called by 2
cmd/redis-ts-adapter/main.go
add
called by 1
internal/redis_ts/client.go

Shape

Function 18
Method 8
Interface 2
TypeAlias 2
Struct 1

Languages

Go100%

Modules by API surface

cmd/redis-ts-adapter/main.go15 symbols
internal/redis_ts/client.go12 symbols
internal/redis_ts/client_test.go4 symbols

For agents

$ claude mcp add prometheus-redistimeseries-adapter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page