Monitoring with Collectd, InfluxDB and Grafana (Part1)

Rate this post


Today more than yesterday we need to have a visualization of our architecture in real time in order to react against issues, to maintain our infrastructure, to have a view of our Business or to ensure the success to be able to have the performance announce during contract like Service Level Agreement (SLA).

Tools like Nagios or check_mk no longer need to proof how they are good at this. However, the way the infrastructure is building change and how to visualize it too.

Stateless and decoupled architecture are the future mindset to have in this new way to think how to deploy more efficiently with high availability, scalabilty and fault tolerance.

If a customer informs you that a service is down it’s already too late…

To monitor the infrastructure I will show you how to install the following tools :

  • CollectD
  • InfluxDB
  • Grafana

CollectD will be use to collect the data and metric from our system when InfluxDB will be our datastore in case of store all these new metrics and last but not least Grafana as a powerful Visualization tool with Dashboard.

The best would be to install this environment on docker but as many people are not yet in, I will show you an installation on Centos 7.

Prerequisites for CentOS 7

  • Minimal install + compatibility libraries
  • IP Static
  • Updated and upgraded if necessary
  • wget, net-tools installed

Prerequisites for InfluxDB and Grafana

  • Repositories for each one of them
  • epel-release already installed

How to install the epel-release repository :

  • yum install epel-release -y

Add repository for influxDB :

  • cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
    name = InfluxDB Repository – RHEL \$releasever
    baseurl =\$releasever/\$basearch/stable
    enabled = 1
    gpgcheck = 1
    gpgkey =

Add repository for Grafana :

  • cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo

Let’s jump to the second part since we finished with the necessary prerequisites. In the second part we will install our solution in order to have our complete monitoring infrastructure.