Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 1.06 KB

MONITORING.md

File metadata and controls

34 lines (30 loc) · 1.06 KB

Monitoring

Getting started (development mode): Setting up prometheus & grafana

  1. Start prometheus_exporter in the mampf container sudo docker-compose exec mampf prometheus_exporter -b 0.0.0.0 -a lib/collectors/mampf_collector.rb
  2. Setup prometheus in development
cd docker/development
sudo docker run -d \
-p 9090:9090 \
--name prometheus -v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus
# Add to mampf dev network
sudo docker network connect development_default prometheus
  1. setup Grafana:
sudo docker run -d \                                      
-p 2345:2345 \
--name grafana \
-e "GF_SERVER_HTTP_PORT=2345" \
grafana/grafana
  1. Now visit localhost:2345 and configure the datasource (prometheus:9090)
  2. Setup the dashboard, interisting metrics:
  • rate(ruby_collector_sessions_total[5m])
  • rate(ruby_http_requests_total[5m])
  • ruby_user_count: Number of users in the DB
  • ruby_uploaded_medium_count: Number of Media
  • ruby_tag_count: Number of Tags
  • ruby_submissions_count: Number of Submissions