prometheus-redistimeseries-adapter

redislabs/prometheus-redistimeseries-adapter Docker Image

redislabs

Prometheus远程存储适配器,用于通过远程写入功能接收Prometheus指标并将其写入带有TimeSeries模块的Redis中。

2 次收藏下载次数: 0状态:社区镜像维护者:redislabs仓库类型:镜像最近更新:

Prometheus-RedisTimeSeries 适配器

Redis TimeSeries适配器通过https://prometheus.io的https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations功能接收指标,并将其写入带有https://github.com/RedisLabsModules/redis-timeseries的Redis中。

快速开始

您可以通过单个Docker Compose快速体验Prometheus-RedisTimeSeries、RedisTimeSeries、Prometheus和Grafana:

bash
cd compose
docker-compose up

Grafana可通过3000端口访问(默认凭据:admin:admin),Prometheus可通过9090端口访问。

开始使用

构建项目

bash
make build
cd bin

运行适配器

要将指标发送到Redis,请提供host:port格式的地址:

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

配置Prometheus

要从Prometheus接收指标,需在Prometheus配置中添加https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<remote_write>部分:

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

Makefile命令

运行测试

bash
make test

Go代码检查

bash
make lint

Redis Sentinel配置

如果使用Redis Sentinel实现Redis高可用,需使用redis-sentinel相关标志:

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

其他标志

打印帮助信息

bash
redis-ts-adapter --help

设置日志级别

bash
redis-ts-adapter --log.level debug

设置发送样本到远程存储的超时时间

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

设置Prometheus发送指标的监听端口

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

贡献

本项目贡献指南

版本发布

参见https://github.com/RedisTimeSeries/prometheus-redistimeseries-adapter/releases

贡献者

参见https://github.com/RedisTimeSeries/prometheus-redistimeseries-adapter/contributors

许可证

详见LICENSE文件

致谢

  • 感谢Prometheus社区提供出色的https://prometheus.io,以及为本项目提供基础的https://github.com/prometheus/prometheus/tree/master/documentation/examples/remote_storage/remote_storage_adapter。
  • 感谢https://github.com/go-redis/redis社区提供本项目使用的Golang Redis客户端。
  • 感谢https://github.com/PurpleBooth提供的https://gist.github.com/PurpleBooth/***bb0361f32d87a2

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 prometheus-redistimeseries-adapter 镜像标签

docker pull docker.xuanyuan.run/redislabs/prometheus-redistimeseries-adapter:<标签>

DockerHub 原生拉取命令

docker pull redislabs/prometheus-redistimeseries-adapter:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告