Skip to content

Developer-s-Foundry/DF-2.0-AIMA-Metrics-Service

Repository files navigation

Metrics Management Microservice

This is a metrics management service that stores metrics scraped by prometheus based on the services its monitoring, filters, query prometheus and distributed a formatted data to a message broker.


📘 Overview

This project was built to enable storing metrics scraped by prometheus based on the services its monitoring. It filters, query prometheus and distributed a formatted data to a message broker.


🛠️ Features

Metrics search — enable querying metrics using parameters stated on the API docs


Tech Stack

  • Expressjs
  • Postgres
  • Bullmq
  • RabbitMq
  • node_cron

  • Application flow

    1. Consumes data published by rabbitmq

    2. Cron job fetches data every minute from the database and adds to a queue

    3. Hosted prometheus url of user is extracted from each data on the queue

    4. Prometheus url is queried for sets of metrics and the data around it

    5. Metric data is stored in database as well as published to rabbitmq for consumption by other Microservices

    🚀 How to Get Started

    Follow these steps to set up and run the project locally:

    1. Clone the repository
      https://github.com/Developer-s-Foundry/DF-2.0-AIMA-Metrics-Service
      
    2. navigate into the project directory
      cd DF-2.0-AIMA-Metrics-Service
      
    3. install your dependencies
      npm install
      
    4. configure your environment variable using the .env.example file as a template
      copy .env.example into .env
      
    5. generate your migrations
      npm run typeorm:migration
      
    6. run your migrations
      npm run migration:run:dev
      
    7. start the dev server
      npm run dev
      
    8. go to url/docs to view API docs
      http://localhost:port-number/docs
      
      

    👥 Contributors

    @ukasquared

    @iamaamunir

    About

    This is a metrics management service that collects metric from prometheus based on the services its monitoring, filters, query prometheus and distributed a formatted data to a message broker,

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

     
     
     

    Contributors