Code Monkey home page Code Monkey logo

hadryyassine / promrulewizard Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.55 MB

This project applies Model-Driven Engineering (MDE) techniques to automate the generation of monitoring configurations for Prometheus, a popular open-source monitoring and alerting toolkit. Utilizing Eclipse Epsilon, the project transforms high-level application metrics specifications into detailed Prometheus alerting and recording rules

HTML 4.47% CSS 2.42% JavaScript 68.73% Java 24.38%
model-driven-development model-driven-engineering prometheus

promrulewizard's Introduction

Introduction

In the ever-evolving landscape of software development and operations, DevOps practices are integral in accelerating deployment and maintaining applications. Effective monitoring of application performance is a crucial component for maintaining reliability and service health. However, the complexity and time-consuming nature of configuring monitoring tools like Prometheus can be a significant hurdle.

Problem Statement

A primary challenge in DevOps is the efficient generation of monitoring rules for applications. The manual process of translating application metrics specifications into detailed Prometheus monitoring rules is error-prone and time-consuming. This manual approach hinders the rapid deployment and iterative development that are essential in effective DevOps practices.

Proposed Solution

This project introduces a web-based application designed to automate the generation of Prometheus monitoring rules from user-defined application metrics specifications. Utilizing Model-Driven Engineering (MDE), the application will transform metrics into detailed Prometheus alerting and recording rules in YAML format. Developed using Spring Boot and React JS, it will provide an intuitive interface for inputting metrics specifications. The backend will process this input, converting it into Prometheus-compatible rules, thus providing users with ready-to-use YAML files for their monitoring setup. This solution aims to simplify the monitoring setup process, ensuring accuracy and consistency in the Prometheus rules generation, and enhancing the efficiency of DevOps workflows.

Architecture & Road map

Architecture

Road Map

Selected metamodels

Source Meta Model : Application Metrics Specification

  • The Source Metamodel is centered around MetricSpecification, which defines metrics, their names, alert conditions, thresholds, labels, and annotations.
  • MetricSpecification includes:
    • metricName: The name of the metric.
    • alertConditions: Conditions under which alerts should be triggered.
    • thresholds: Defined critical and warning thresholds for metrics.
    • labels: Key-value pairs for metric categorization.
    • annotations: Additional information associated with the metric.

Target Meta Model : Promotheus Rule YAML

  • The Target Metamodel is designed for PrometheusRule, which is used for alerting and recording rules in Prometheus.
  • PrometheusRule includes:
    • ruleType: Determines if the rule is an alert or a record.
    • name: The name of the rule, based on the metric name and its type.
    • expression: The logic or condition defining the rule.
    • forDuration: The duration for which the condition must be true.
    • labels: Key-value pairs used for filtering and aggregation.
    • annotations: Descriptive information providing more context about the rule.

Transformation Playground

  • This ATL rule transforms a MetricSpecification into a PrometheusRule.
  • The ruleType is determined based on the conditionType of the alertConditions in the source metamodel.
  • The name, expression, forDuration, labels, and annotations are mapped and transformed from the source to the target metamodel.

Generation Playground

  • The EGL template provides a textual representation of a PrometheusRule instance.
  • It visualizes the properties of PrometheusRule like ruleType, name, expression, along with its labels and annotations.
  • The template is designed to iterate over the labels and annotations collections, displaying each key-value pair.

Contributers

Aknowledgement

This project was inspired from this Repository, mainly the backend and the frontend : https://github.com/Assifar-Karim/MonasCI !

Conclusion

The Prometheus Monitoring Rules Generator represents a significant advancement in the field of DevOps and application monitoring. By automating the conversion of high-level application metrics into detailed monitoring rules, this tool not only saves time and reduces the potential for errors, but also democratizes the process, making advanced monitoring setups accessible to a wider range of users, regardless of their expertise in Prometheus. Looking forward, the potential for further enhancements and integrations with other DevOps tools opens a pathway for even more streamlined and efficient application monitoring solutions.

promrulewizard's People

Contributors

garmoutisalma avatar hadryyassine avatar zarhouni21 avatar

Stargazers

 avatar  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.