Skip to content

Latest commit

 

History

History
77 lines (57 loc) · 2.55 KB

prometheus-dcos19.md

File metadata and controls

77 lines (57 loc) · 2.55 KB

DC/OS metrics with Prometheus and Grafana on DC/OS 1.9 and 1.10

This walkthrough is broken into two parts: first deploying the Prometheus plugin on every node in your cluster, and second configuring Prometheus and Grafana on DC/OS.

Prerequisites:

Part 1: Deploying the Prometheus plugin

SSH into every node and become root:

$ dcos node ssh --master-proxy --private-ip=<ip-address>
$ sudo su

Download the plugin and make sure it's executable

$ curl -o /opt/mesosphere/bin/dcos-metrics-prometheus -L https://downloads.mesosphere.io/dcos-metrics/plugins/prometheus
$ chmod +x /opt/mesosphere/bin/dcos-metrics-prometheus

Download the systemd configuration for your plugin

$ curl -o /etc/systemd/system/dcos-metrics-prometheus.service -L https://downloads.mesosphere.io/dcos-metrics/plugins/prometheus.service

Change the --dcos-role flag to ‘agent’, ‘agent_public' or ‘master'

$ vi /etc/systemd/system/dcos-metrics-prometheus.service

Load the new configuration and start the plugin

$ systemctl daemon-reload
$ systemctl start dcos-metrics-prometheus.service

Part 2: Configuring Prometheus and Grafana

Download the following json resources:

Deploy Prometheus and Grafana in a pod:

$ dcos marathon pod add metrics.json

Deploy the Prometheus and Grafana service proxies:

$ dcos marathon app add prometheus.json
$ dcos marathon app add grafana.json

Wait for all services to become healthy, then open the Grafana UI at https://your-dcos-master-url/service/grafana

Add a Prometheus datasource to Grafana named 'DC/OS Metrics', using all the default values. Ensure that it set to be the default datasource.

Create a new dashboard in Grafana. You will see metrics appearing from the newly created DC/OS Metrics source.