Prometheus is an open source monitoring platform that help you analyze and monitor infrastructure components. Prometheus server collects metrics from targets by scraping HTTP endpoints.

Minio now has built-in support for exporting Prometheus compatible data on an unauthenticated endpoint. This enables Prometheus monitoring for Minio server deployments without sharing server credentials and eliminates the need to run an external Prometheus exporter.

In this post, we’ll take a look at the data points available under a Minio Prometheus endpoint, and see how to use those fields to create critical alerts for Minio based storage infrastructure. Finally, we’ll also see how to visualize the data points using Grafana.

Setup Minio and Prometheus

Setting up Prometheus to scrape Minio endpoints is straightforward. Follow the [How to monitor Minio server with Prometheus] guide to setup Minio server monitoring with Prometheus.

Note that Prometheus support was added in Minio server release RELEASE.2018–05–11T00–29–24Z , so you need to have this version or later running. To get started with Minio, refer Minio QuickStart Document.

Minio Prometheus exporter fields

Minio uses the Prometheus Go client along with internal administration data to instrument and export data. Here are the data points that you can expect from the Minio Prometheus endpoint.

  • Uptime (available for Minio server/gateway)

process_start_time_seconds : This stores the time since Minio server process started. You can use it with Prometheus query language to generate interesting insights easily. For example, get Minio server uptime using time() — process_start_time_seconds and detect crash loops using changes(process_uptime_seconds[30m])

  • Storage (available for Minio server instances only)

minio_disk_storage_used_bytes : This is the total disk storage used by Minio server (in bytes).

If caching is enabled, following additional metrics are available

minio_disk_cache_storage_bytes : This is the total cache capacity available for current Minio instance (in bytes).

minio_disk_cache_storage_free_bytes : This is the free cache capacity available to current Minio instances (in bytes).

  • Request duration (available for Minio server/gateway)

Request duration information is split into request types using Prometheus Histogram metric type. The basename for this metric is minio_http_requests_duration_seconds . You can add _bucket to the basename to get cumulative counters for all the request types. So, minio_http_requests_duration_seconds_bucket will show something like this:

 

Other options are minio_http_requests_duration_seconds_sum which shows the current aggregate time spent servicing all HTTP requests in seconds, and minio_http_requests_duration_seconds_count which shows the sum of all requests served.

  • Network statistics (available for Minio server/gateway)

minio_network_received_bytes_total : This shows the total number of bytes received by Minio server (in bytes).

minio_network_sent_bytes_total : This is the total number of bytes sent by Minio server (in bytes).

  • Disk statistics (available for Minio server instances only)

minio_total_disks : This is the total number of disks available to Minio server.

minio_offline_disks : This is the count of total offline disks.


Use Cases

Monitoring alone is of not much use until you have a integrated alerting system that notifies concerned stakeholders whenever something goes wrong. Thankfully Prometheus does all this and more.

Once Minio server data is plugged into Prometheus monitoring, you can configure Prometheus alertmanager and create alerting rules. This way you have production ready, end to end monitoring and alerting setup.

Let’s explore some interesting use cases of such alerting setup.

  • Alert when disk is offline

Using the minio_offline_disks field, you can set up alerts if disk(s) are offline on a Minio server instance. This is how a sample alerting rule would look

groups:
- name: Minio
rules:
- alert: DiskOffline
expr: minio_offline_disks != 0
for: 5m
labels:
severity: page
annotations:
summary: Disk offline
  • Alert when free space is less than specified threshold

Using the minio_disk_storage_free_bytes field, you can set up alerts when a Minio server instance is running low on available storage space. A sample alerting rule would look like this

groups:
- name: Minio
rules:
- alert: StorageSpaceExhausted
expr: minio_disk_storage_free_bytes <
10737418240
labels:
severity: page
annotations:
summary: Free space threshold reached

This will fire an alert when free bytes reaches below 10GiB.

  • Alert when a Minio server instance is under high load

Following above examples, you can set up alerts when Minio server is under high load, using the minio_http_requests_duration_seconds_bucket field.


Grafana

Grafana is a visualization platform to understand metrics. It integrates very well with Prometheus and helps visually analyze Prometheus data. If you followed along till now, you already have Minio data coming into your Prometheus server.

Let us now see how to set up Grafana to fetch data from Prometheus and visualize it via Grafana dashboard.

  • Install Grafana

On Ubuntu/Debian based platforms, Grafana already has deb packages available. Install it using

$ wget https://s3-us-west-2.amazonaws.com/grafana- releases/release/grafana_5.1.2_amd64.deb
$ sudo apt-get install -y adduser libfontconfig
$ sudo dpkg -i grafana_5.1.2_amd64.deb

Once installed, start Grafana using

$ sudo service grafana-server start

For other platforms refer Grafana documentation. By default Grafana listens on port 3000. Access Grafana UI via browser on http://localhost:3000 . Default credentials are user name = admin and password = admin

  • Create Dashboard

Once you have access to the UI, create a datasource for Grafana to fetch data from Prometheus. Click on Settings >> Data Sources >> Add Data Source. Then select Prometheus as the data type in the dropdown and add Prometheus URL and a name for the data source.

Then click Create >> Dashboard on the left side bar. Inside the dashboard, you can add panels. Select a graph as the new panel. Once the graph opens, click on the edit button on graph top menu bar. You can now edit graphs properties. Here you can choose any of the data points that Minio exposes and the data source.

 
Minio data points plotted on a graph in Grafana dashboard.

While you’re at it, help us understand your use case and how we can help you better! Fill out our “Best of Minio” deployment form (takes less than a minute), and get a chance to be featured on the Minio website and showcase your Minio private cloud design to Minio community.

 
 
 
 

Monitor Minio server with Prometheus的更多相关文章

  1. A simple way to monitor SQL server SQL performance.

    This is all begins from a mail. ... Dear sir: This is liulei. Thanks for your help about last PM for ...

  2. MinIO Server配置指南

    MinIO server在默认情况下会将所有配置信息存到 ${HOME}/.minio/config.json 文件中. 以下部分提供每个字段的详细说明以及如何自定义它们. 配置目录 默认的配置目录是 ...

  3. 为MinIO Server设置Nginx代理

    官方文档地址:http://docs.minio.org.cn/docs/master/setup-nginx-proxy-with-minio nginx参考网址:https://www.nginx ...

  4. monitor weblogic server ,Very simple to use, weblogic监控、巡检、故障简单小工具

        1. 开发了一个简单的监视weblogic执行情况的小程序.各位朋友下载下来试试,不用登陆console就能够知道server的执行状况,包含了jvm.线程.jdbc.状态jms等:另一个更简 ...

  5. 使用 Prometheus 监控minio 性能指标信息&&docker-compose 方式运行

    minio server 已经支持Prometheus 了,对于系统的运行参数我们可以方便.实时的查看 运行使用docker-compose docker-compose 文件 version: &q ...

  6. 使用loki+ mtail + grafana + prometheus server分析应用问题

    loki 是一个方便的类似prometheus 的log 系统,mtail 是一个方便的日志提取工具, 可以暴露为http 服务——支持导出prometheus metrics 环境准备 docker ...

  7. 从零开始搭建Prometheus自动监控报警系统

    从零搭建Prometheus监控报警系统 什么是Prometheus? Prometheus是由SoundCloud开发的开源监控报警系统和时序列数据库(TSDB).Prometheus使用Go语言开 ...

  8. Stream processing with Apache Flink and Minio

    转自:https://blog.minio.io/stream-processing-with-apache-flink-and-minio-10da85590787 Modern technolog ...

  9. Prometheus监控系统之入门篇(一)

    1. 简介 Prometheus: (简称Prom)是由SoundCloud开发的开源监控报警系统.是大名鼎鼎的CNCF云原生基金会下的第二大开源项目.具有如下特点: 使用Go语言开发 内置时序数据库 ...

随机推荐

  1. 查看json数据更新情况

    #! python3 # -*- coding:utf8 -*- #主要为读取excel中接口地址,打开网页爬取url页面中数据,解析json,检查是否符合逻辑(正常) import requests ...

  2. :工厂模式1:方法模式--Pizza

    #ifndef __PIZZA_H__ #define __PIZZA_H__ class Pizza { public: Pizza(){} virtual ~Pizza(){} virtual c ...

  3. 一次Web请求返回406原因与解决方案

    ajax请求,响应信息返回的却是报错406,. 1.断点调试,进入对应处理方法,且得到正确信息返回到解析器.使用的是ssm,前端ftl 2.js将返回错误信息打出来,类似为: 百度406错误出现的原因 ...

  4. ylz 开发学习笔记一(注意事项)

    Eclipse快捷键 断点 F6执行下一步 等等 C+S+R 搜索文件名字      C+鼠标移动左击 跳入类文件    jsp 文件的断点是使用 debugger  之后再chrom 用F10单步调 ...

  5. php 正则概述

    修饰符   s 模式中的点号元字符匹配所有字符 非打印字符 字符  含义  \cx  匹配由x指明的控制字符.例如, \cM 匹配一个 Control-M 或回车符.x 的值必须为 A-Z 或 a-z ...

  6. Vue.js与WdatePicker日历控件冲突问题的解决方案

    问题:同时使用Vue.js与WdatePicker时,双向绑定的日期字段获取不到界面输入的值,而且别的字段的值改变后,日期控件的内容会被清空 原因:WdatePicker不是Vue的插件,不能响应Vu ...

  7. 2019-03-15-day011-递归生成器

    函数的进阶: 动态参数: 两种: 动态位置参数 > 动态默认参数 打散(聚合): 实参处打散 形参处聚合 不在函数中第一次使用*打散,第二次是聚合 在数据库中快速写入数据的时候,**dic 名称 ...

  8. VB识别分隔符

    strTypeEx = ReadIniFile("Type", "Type", App.Path & "\set.ini") str ...

  9. Spring Boot 揭秘与实战(二) 数据存储篇 - JPA整合

    文章目录 1. 环境依赖 2. 数据源 3. 脚本初始化 4. JPA 整合方案一 通过继承 JpaRepository 接口 4.1. 实体对象 4.2. DAO相关 4.3. Service相关 ...

  10. Django之模版层-语法:标签 {% %}

    标签 {% %} for循环以及for..empty.. <h4>for标签</h4> {% for i in lis %} <p>{{ i }}</p> ...