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.
- A cluster running DC/OS 1.9 or 1.10 (see Prometheus on DC/OS for newer versions of DC/OS)
- The DC/OS CLI installed
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
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.