Skip to content

Smile-SA/monitoring-pace-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitoring Pace Scheduler

Overview

The Monitoring Pace Scheduler is an adaptive monitoring solution that dynamically adjusts scrape intervals based on metric patterns. Unlike traditional fixed-interval approaches, it analyzes metric change frequencies to automatically optimize scrape intervals, reducing data collection during stable periods and increasing frequency when metrics show high activity.

Prerequisites

Clone the repository:

git clone https://gitlab.com/your-repo/monitoring-pace-scheduler.git
cd monitoring-pace-scheduler

Install dependencies:

pip install -r requirements.txt

Install tcpdump:

sudo apt install tcpdump

Additional components:


Configuration

Set up the Monitoring Behavior

Edit config.yaml to define scrape logic:

prometheus:
  config_file: 'prometheus.yml'             # Path to the Prometheus configuration file
  reload_url: 'http://0.0.0.0:9091/-/reload' # URL to trigger Prometheus config reload

thresholds:
  update_threshold: 0.05       # Minimum change ratio required to update the scrape interval
  default_scrape_interval: 15  # Initial interval (in seconds)
  max_scrape_interval: 900     # Maximum allowed scrape interval (in seconds)

metrics:
  to_monitor:
    - '(1 - avg(rate(node_cpu_seconds_total{mode="idle"}[1m])) by (instance)) * 100'  # metric to monitor : CPU usage percentage

Execution

To run the adaptive monitoring strategy in a production-like environment:

# Run adaptive group 
python3 scheduler.py --duration 3600

By default, the scheduler runs for 1 hour (--duration 3600)

You can remove the --duration flag to run the monitoring loop continuously.


Evaluation

To assess the impact and efficiency of dynamic scraping:

Benchmark Steps:

  • Use Gatling to simulate fluctuating system loads

  • Capture Prometheus network traffic using tcpdump

  • Compare baseline vs. dynamic strategies in terms of:

    • Data volume sent
    • Metric behaviour

Full procedure: Benchmark Instructions

Evaluation notebook: src/benchmark/evaluation.ipynb


License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •