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.
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.
Metrics search — enable querying metrics using parameters stated on the API docs
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
Follow these steps to set up and run the project locally:
- Clone the repository
https://github.com/Developer-s-Foundry/DF-2.0-AIMA-Metrics-Service
- navigate into the project directory
cd DF-2.0-AIMA-Metrics-Service - install your dependencies
npm install
- configure your environment variable using the .env.example file as a template
copy .env.example into .env
- generate your migrations
npm run typeorm:migration
- run your migrations
npm run migration:run:dev
- start the dev server
npm run dev
- go to url/docs to view API docs
http://localhost:port-number/docs