Prometheus远程存储适配器,用于通过远程写入功能接收Prometheus指标并将其写入带有TimeSeries模块的Redis中。
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:
bashcd compose docker-compose up
Grafana可通过3000端口访问(默认凭据:admin:admin),Prometheus可通过9090端口访问。
开始使用
构建项目
bashmake build cd bin
运行适配器
要将指标发送到Redis,请提供host:port格式的地址:
bashredis-ts-adapter --redis-address localhost:6379
配置Prometheus
要从Prometheus接收指标,需在Prometheus配置中添加https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<remote_write>部分:
yamlremote_write: - url: 'http://127.0.0.1:9201/write'
Makefile命令
运行测试
bashmake test
Go代码检查
bashmake lint
Redis Sentinel配置
如果使用Redis Sentinel实现Redis高可用,需使用redis-sentinel相关标志:
bashredis-ts-adapter --redis-sentinel-address localhost:26379 --redis-sentinel-master mydb
其他标志
打印帮助信息
bashredis-ts-adapter --help
设置日志级别
bashredis-ts-adapter --log.level debug
设置发送样本到远程存储的超时时间
bashredis-ts-adapter --send-timeout 60s
设置Prometheus发送指标的监听端口
bashredis-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
redislabs 命名空间的其他可用镜像:
redislabs/redis
redislabs/redisinsight
redislabs/operator-internal
redislabs/rebloom
redislabs/redismod
redislabs/memtier_benchmark
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 prometheus-redistimeseries-adapter 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务