Skip to content

Installation Guide

Hagai Ovadia edited this page Aug 7, 2016 · 6 revisions

Installation Guide

Basic Architecture

The idea is that metrics are being exported by the JMX exporter (Cassandra metrics) and Node exporter(System metrics) and then they are collected by prometheus (customised by prometheus proxy) and finally visualised by Grafana.

We have made some basic assumptions regarding your architecture.

  • You have these components installed:
    • Cassandra cluster(s) installed and running jmx and node exporter (see below)
    • Prometheus server, collecting metrics from that Cassandra cluster
    • Grafana server with prometheus configured as a potential data source.

Given these prerequisites, all you need to do is config your prometheus datasources (see below), import the dashboards (dashboards/*.json) into Grafana and enjoy!

How to build a standalone instance

To get a hold of things you can check out how we built the standalone version. This is meant to give a sense of what is required to have a working version of the dashboards. Feel free to use each step of installation independently if you have some of the systems already installed.

You will need the to use the following packages:

Configurations

Prometheus

We deployed the prometheus with docker. The prometheus.yml is in the repository.

docker run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

Prometheus Proxy

We used prometheus proxy for pushing our custom tags (DC, instance name, etc.) /etc/prometheus/proxy/promproxy.yml

---
port: 9191
services:
  hackathon:
    endpoint: http://localhost:5560/metrics
    labels:
      servicetype: cassandra
      instance: <your host name>
      datacenter: DC1
      cluster: hackathon


### Node Config! ###

  node-hack:
    endpoint: http://localhost:9100/metrics
    labels:

Jmx Exporter

We used the config as describe in https://github.com/prometheus/jmx_exporter.

The prometheus_cassandra.yml is in the repository.

Node Exporter

We ran the node exporter as describe here.

/etc/prometheus/node_exporter/node_exporter -collectors.enabled=vmstat,diskstats,filesystem,loadavg,meminfo,netdev,stat,textfile,time,bonding,ntp,filefd,mdadm,uname,sockstat,tcpstat,supervisord -web.listen-address=:9100 -collector.ntp.server=ntp1

Grafana

We added the prometheus data source by the these instructions.

http://docs.grafana.org/v2.6/datasources/prometheus/

Importing the Dashboards

Currently the dashboard contain this place holder for all data sources: [DataSource]. Once you have a prometheus datasource installed, you should run a "Find and Replace" on the dashboards to replace the place holder with the name of your datasource.