Coder Social home page Coder Social logo

minio-alertmanager's Introduction

minio-alertmanager

minio-alertmanager is a project that integrates MinIO, Prometheus, Grafana, and AlertManager. It allows you to monitor MinIO metrics, set up alerts, and visualize data using Grafana dashboards. Additionally, it includes an alert producer service written in Node.js that sends alerts to a Gotify server.

Features

  1. MinIO: A high-performance object storage service.
  2. Prometheus: A monitoring and alerting toolkit.
  3. Grafana: A powerful visualization platform.
  4. Gotify: A simple server for sending and receiving messages in real-time per WebSocket.
  5. AlertManager: A tool for handling alerts and notifications.
  6. Alert Producer (Node.js): A custom service that generates alerts and sends them to a Gotify server.

Installation and Configuration

  1. Clone the Repository:

    git clone https://github.com/azita-abdollahi/minio-alertmanager.git
    
  2. Configure Environment Variables:

    • Create a config directory with necessary services config files (e.g., Alert rules settings, Prometheus settings).
    • Customize the configuration according to your deployment.
  3. Docker Compose:

    • Use docker-compose.yml to define your services (Prometheus, Grafana, Alert producer and AlertManager).
    • Adjust ports, volumes, and other settings as needed.

Monitoring with Prometheus

Setting Up Grafana Dashboards

  1. Access Grafana:
    • After starting the services, access Grafana at http://localhost:3000.
    • Log in with the default credentials (admin/admin).
  2. Add Prometheus as a Data Source:
    • In Grafana, add Prometheus as a data source.
    • Use the URL of your Prometheus instance (e.g., http://prometheus:9090).
  3. create Dashboards:
    • Import MinIO-related dashboards from Grafana’s community dashboards or create custom ones. (i use minio-dashbord)
    • Visualize MinIO metrics, such as drive usage, latency, and cluster health.

Alerts with AlertManager

  • Define alert rules in Prometheus or Grafana.

  • Example alert rule:

    • Alert if MinIO cluster tolerance drops below a certain threshold:

      - alert: High Minio Requests
          expr: minio_s3_requests_total > 100000
          for: 5m
          labels:
            severity: warn
          annotations:
            title: "Instance {{ $labels.instance }} High MinIO usage detected"
            description: "{{ $labels.instance }} of job {{ $labels.job }} has too MinIO HTTP requests in the last 5 minutes."
            priority: "5"
  • Define alert rules in Prometheus or Grafana (as mentioned in the previous section).

  • AlertManager will handle notifications based on these rules.

Custom Alert Producer (Node.js)

  • The alert producer service in Node.js generates custom alerts.
  • Configure it to send alerts to your Gotify server.
  • Example alert scenarios:
    • Low disk space on MinIO nodes.
    • High latency for MinIO requests.

for setup minio see my minio-repository.

Note: be sure to leave this line in the minio service environment setting.

- MINIO_PROMETHEUS_AUTH_TYPE=public

The MINIO_PROMETHEUS_AUTH_TYPE environment variable controls authentication for scraping MinIO metrics endpoints by Prometheus.

  1. Default Behavior:
    • By default, MinIO requires authentication for scraping metrics endpoints.
    • Prometheus must include a bearer token in the scrape configuration to access MinIO metrics.
  2. Setting MINIO_PROMETHEUS_AUTH_TYPE to ‘public’:
    • When you set MINIO_PROMETHEUS_AUTH_TYPE to ‘public’, MinIO allows unauthenticated access to its metrics endpoints.
    • This means you can scrape MinIO metrics without the need for a token in your Prometheus scrape configuration.

minio-alertmanager's People

Contributors

azita-abdollahi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.