Monitor Cloud Exchange with Prometheus and Grafana

Monitor Cloud Exchange with Prometheus and Grafana

Configure a Metric Exporter for Cloud Exchange

  1. Download the latest version of the linux node exporter from: Releases · prometheus/node_exporter.
    $ wget
  2. Extract the node exporter and start it in the background.
    $ tar -xvf node_exporter-1.7.0.linux-amd64.tar.gz
    $ cd node_exporter-1.7.0.linux-amd64
    $ ./node_exporter &
  3. Verify the connectivity by opening your machine address with port 9100.
    > http://<machine_IP>:9100


If this is to be used for an EC2 instance, make sure you expose the port from AWS console > inbound rules.


We recommend that you configure Prometheus and Grafana on a new instance so it will not affect existing Cloud Exchange performance.

You will need to install docker and docker-compose on the new machine, and then use the steps in the following sections to configure Prometheus and Grafana on the new machine.

Configure Prometheus

  1. Create a prom directory in /opt.
    $ cd /opt
    $ mkdir prom
  2. Create a Prometheus config file with the following content.
    $ vi prom/prometheus.yml


    Change your machine IP in the targets section.

      scrape_interval: 15s
      scrape_timeout: 10s
      evaluation_interval: 15s
      - follow_redirects: true
        enable_http2: true
        scheme: http
        timeout: 10s
        api_version: v2
        - targets: []
    - job_name: machines
      scrape_interval: 5s
      scrape_timeout: 5s
      scheme: http
      metrics_path: /metrics
      - targets:
        - :9100 
  3. Create a docker-compose file with following content.
    $ vi prom/docker-compose.yml
    version: "3.3"
        image: prom/prometheus
          - ./prometheus.yml:/etc/prometheus/prometheus.yml
          - "9090:9090"
  4. Start Prometheus.
    $ cd prom
    $ docker-compose up -d
    $ cd ..
  5. Verify the connectivity by going to: http://<your machine ip>:9090/

Configure Grafana

  1. Create a grafana directory in /opt.
    $ cd /opt
    $ mkdir grafana
  2. Create a docker-compose file with following content.
    $ vi grafana/docker-compose.yml
    version: "3.3"
        user: "0"
        image: grafana/grafana-enterprise
          - ./data:/var/lib/grafana:z
          - "3000:3000"
  3. Start Grafana.
    $ cd grafana
    $ docker-compose up -d
    $ cd ..
  4. Open the Grafana UI by going to: http://<your machine ip>:3000/
    1. Log in with default credentials admin / admin).
    2. Change the default password.
  5. Log in to Grafana with the new password.
  6. Now add Prometheus as the Data Source.
    1. Click the menu icon, expand Connections, and click Data sources.

    2. Click Add data source.

    3. Select Prometheus.

    4. Enter the Prometheus settings, and then scroll down and click Save & test.

  7. Create a Dashboard.
    1. Go to the home page and click Create your first dashboard.

    2. Click Import dashboard.

    3. Enter 1860 for the ID and click Load.

    4. Enter a Dashboard name, select the Prometheus data source that you added previously, and then click Import.

  8. Now you can see the dashboard for a Cloud Exchange instance.

Share this Doc

Monitor Cloud Exchange with Prometheus and Grafana

Or copy link

In this topic ...