author avatar

soniya.rayabagi

Tue Jul 02 2024

Install powerful monitoring tools, Grafana and Prometheus
Grafana:
• Install with Homebrew: brew install grafana
• Start the service: brew services start grafana
• Access at http://localhost:3000 (default login: admin/admin)
• Stop the service: brew services stop grafana
Prometheus:
• Install with Homebrew: brew install prometheus
• Configure prometheus.yml:


global:
  scrape_interval: 10s

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']


where -> scrape_interval: 10s: Prometheus will collect metrics from all defined targets every 10 seconds.
scrape_configs: This section defines how Prometheus should scrape metrics from targets.
• Start with configuration: prometheus --config.file=prometheus.yml
• Access at http://localhost:9090
#devops #grafana #prometheus