https://github.com/hadryyassine/promrulewizard
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
https://github.com/hadryyassine/promrulewizard
model-driven-development model-driven-engineering prometheus
Last synced: 2 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/hadryyassine/promrulewizard
- Owner: hadryyassine
- Created: 2024-01-01T23:57:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-05T11:18:50.000Z (over 1 year ago)
- Last Synced: 2024-12-25T20:18:24.991Z (4 months ago)
- Topics: model-driven-development, model-driven-engineering, prometheus
- Language: JavaScript
- Homepage:
- Size: 1.51 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 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
- [Yassine Hadry](https://github.com/hadryyassine)
- [Fatima Zahra Zarhouni](https://github.com/zarhouni21)
- [Salma Garmouti](https://github.com/GarmoutiSalma)## 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.