Skip to content

Instantly share code, notes, and snippets.

@Shmarkus
Created October 25, 2018 14:19
Show Gist options
  • Save Shmarkus/fb426083070b64af06dfb760a8450e17 to your computer and use it in GitHub Desktop.
Save Shmarkus/fb426083070b64af06dfb760a8450e17 to your computer and use it in GitHub Desktop.
Prometheus with Grafana compose file
version: "2"
services:
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
@Shmarkus
Copy link
Author

Be sure to create prometheus config file (replace APP-NAME, HOST and PORT):

global:
  scrape_interval:     5s # Set the scrape interval to every 5 seconds.
  evaluation_interval: 5s # Evaluate rules every 5 seconds.
scrape_configs:
  - job_name: 'APP-NAME'
    metrics_path: '/prometheus'
    static_configs:
      - targets: ['HOST:PORT']

@Shmarkus
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment