当前位置:网站首页>prometheus监控minio
prometheus监控minio
2022-07-30 05:49:00 【大新新大浩浩】
项目使用了minio,所以记录一下打开prometheus-minio监控的方式。
环境列表
- minio版本:minio version RELEASE.2021-11-09T03-21-45Z
- minio API端口:9000
- prometheus版本:2.37.0
- granafa版本:9.0.4
- min-dashboard-ID:13502
minio打开监控的两种方式
1、public方式
minio增加MINIO_PROMETHEUS_AUTH_TYPE=“public” 配置,然后重启minio服务
prometheus中的配置
- job_name: minio-job
metrics_path: /minio/v2/metrics/cluster
scheme: http
static_configs:
- targets: ['192.168.xxx.xx:9000']
2、身份验证方式
首先使用minio client 设置别名,然后获取prometheus配置
我这里使用的是docker形式运行mc
#运行mc容器
docker pull minio/mc
docker run -it --entrypoint=/bin/sh minio/mc
#设置别名
mc alias set minio http://192.168.xxx.xxx:9000 admin admin
#输出
mc: Configuration written to `/root/.mc/config.json`. Please update your access credentials.
mc: Successfully created `/root/.mc/share`.
mc: Initialized share uploads `/root/.mc/share/uploads.json` file.
mc: Initialized share downloads `/root/.mc/share/downloads.json` file.
#生成配置
mc admin prometheus generate minio
#配置输出
scrape_configs:
- job_name: minio-job
bearer_token: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4MTI0MDA0NTcsImlzcyI6InByb21ldGhldXMiLCJzdWIiOiJhZG1pbiJ9.o2ymp655JwB05XlsXTtZJzDlpYUfT2ITgxOdYyqxiOfnkMznphUALSU0yhgobAaQCLtwAZgnKbjBfwxQJlzKSA
metrics_path: /minio/v2/metrics/cluster
scheme: http
static_configs:
- targets: ['192.168.xxx.xxx:9000']
将生成的配置加入到prometheus的配置中,重启服务即可。
prometheus中的配置
- job_name: minio-job
bearer_token: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4MTI0MDA0NTcsImlzcyI6InByb21ldGhldXMiLCJzdWIiOiJhZG1pbiJ9.o2ymp655JwB05XlsXTtZJzDlpYUfT2ITgxOdYyqxiOfnkMznphUALSU0yhgobAaQCLtwAZgnKbjBfwxQJlzKSA
metrics_path: /minio/v2/metrics/cluster
scheme: http
static_configs:
- targets: ['192.168.xxx.xx:9000']
区别
两种方式的区别就是token的使用。
我目前进行测试集群中使用public方式,target会提示“server returned HTTP status 403 Forbidden”,修改为身份验证方式后才可以正常获取到监控数据。区别如下两图
关于metrics_path问题
有些版本的metrics_path为/minio/prometheus/metrics
有些版本的metrics_path为/minio/v2/metrics/cluster
经过实际测试,至少我现在使用minio版本两个metrics_path都可以使用
granafa-dashboard数据展示
边栏推荐
猜你喜欢
图扑数字孪生北京故宫,推进旅游业元宇宙进程
Biotin-SS-NHS ester|生物素-二硫键-活性酯|CAS:122266-55-1具有良好的水溶性
单片机第一步
测试第一题
二、2队列
一种新的DNA生物素系统Biotin LC hydrazide|CAS:109276-34-8|(+)-生物素酰胺基己酸肼
About memcache kernel, so one of the most popular
libgrape-lite on GPUs: GPU helps accelerate graph analysis tasks
Biotin-C6-amine_N-生物素基-1,6-己二胺_CAS:65953-56-2_100mg
Shortcut keys commonly used in the use of Word
随机推荐
Shortcut keys commonly used in the use of Word
Redis6的数据类型
A New Paradigm for Distributed Deep Learning Programming: Global Tensor
How to import matlab data into modelsim simulation
Rapidly develop GraphScope graph analysis applications
Cas 80750-24-9,去硫代生物素 N-羟基琥珀酰亚胺,淡黄色固体
测开基础知识01
远程连接服务器的MySql
Graph analysis like NetworkX with GraphScope
图扑数字孪生北京故宫,推进旅游业元宇宙进程
掌握JESD204B(二)–AD6676的调试
测试开发工程师成长日记010 - Jenkins中的CI/CD/CT(持续集成构建/持续交付/持续测试)
Mastering JESD204B (3) – Debugging of AD6676
测试开发工程师成长日记009 - 环境排排站:开发环境、测试环境、生产环境、UAT环境、仿真环境
Unity Shader的结构与语义
Azide-SS-biotin|CAS:1620523-64-9|生物素-二硫键-叠氮可降解 (cleavable) 的 ADC linke
Unity Shader 标准光照模型——漫反射
npm安装nodejs环境配置
测试开发工程师成长日记007 - Bug的优先级定义及填写规范
单片机之流水灯