Install Prometheus and Grafana

31 07 2017

These are the steps to install Prometheus and Grafana in a standalone Linux Debian box for monitor their system with a nice dashboard.

Install the package server and exporter from the repo:

apt-get install prometheus prometheus-node-exporter

Change Prometheus to listen only in localhost and the sync strategy (if you want to save battery) /etc/default/prometheus:

ARGS="-web.listen-address=localhost:9090 -storage.local.series-sync-strategy 'never'"

Assure that there is a target in /etc/prometheus/prometheus.yml:

- job_name: node
# If prometheus-node-exporter is installed, grab stats about the local
# machine by default.
- targets: ['localhost:9100']

Restart it and enable in systemd:

systemctl restart prometheus
systemctl enable prometheus

Change the listen address too in the node exporter /etc/default/prometheus-node-exporter:

ARGS="-collector.diskstats.ignored-devices=^(ram|loop|fd)\d+$ \
-collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/) \ -web.listen-address="

Restart it and enable in systemd:

systemctl restart prometheus-node-exporter
systemctl enable prometheus-node-exporter

Download Grafana from their website and install it:

mkdir /opt/grafana
cd /opt/grafana
dpkg -i grafana_4.4.1_amd64.deb

Enable and start it in systemd:

systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server

Use the browser and enter this address (user/password: admin/admin):


Add the Prometheus datasource as in the image:

Add a new dashboard following this path in the menu:

Type the id “1860” inside “ Dashboard”. It automatically get it:

Confirm the import fetching the values from localhost:



Instalar munin-node en RedHat / CentOS 5

10 09 2012

Para instalar munin-node en una máquina RedHat o CentOS 5 hay que utilizar los repositorios dag y forzar algunos paquetes, ya que no se encuentran todos disponibles para ésta release del sistema.

Aquí van los pasos, básicamente, crear un repo nuevo, bajar varios rpm e instalarlos a mano y finalmente instalar munin-node:

cat > /etc/yum.repos.d/dag.repo << FIN
name=Dag RPM Repository for Red Hat Enterprise Linux
cd /var/cache/yum/dag/packages/
wget ';
yum install perl-Net-Server-0.90-2.el5.rf.noarch.rpm -y
wget ';
yum install perl-Socket6-0.23-1.el5.rfx.x86_64.rpm -y
wget ';
yum install perl-Crypt-DES-2.05-3.2.el5.rf.x86_64.rpm -y
wget ';
rpm -ivh --force perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm --nodeps
yum -y install munin-node
/etc/init.d/munin-node restart