Category Archives: Prometheus

Prometheus/Grafana On-Premises

CentOS 7,8 Prometheus/node_exporter rpm yum repo
The repository contains the files needed to build Prometheus RPM packages for CentOS 7 & 8.

Prometheus RPM Installation

cat >> /etc/yum.repos.d/prometheus.repo << DELIM 
[prometheus]
name=prometheus
baseurl=https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch
repo_gpgcheck=1
enabled=1
gpgkey=https://packagecloud.io/prometheus-rpm/release/gpgkey
       https://raw.githubusercontent.com/lest/prometheus-rpm/master/RPM-GPG-KEY-prometheus-rpm
gpgcheck=1
metadata_expire=300
DELIM
cat >> /etc/yum.repos.d/prometheus.repo << DELIM 
[prometheus]
name=prometheus
baseurl=https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch
repo_gpgcheck=1
enabled=1
gpgkey=https://packagecloud.io/prometheus-rpm/release/gpgkey
       https://raw.githubusercontent.com/lest/prometheus-rpm/master/RPM-GPG-KEY-prometheus-rpm
gpgcheck=1
metadata_expire=300
DELIM
yum install prometheus
systemctl daemon-reload
systemctl start prometheus

Grafana RPM Installation

cat >> /etc/yum.repos.d/grafana.repo << DELIM 
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
DELIM
yum install grafana

Start the server with systemd

systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server

Configure the Grafana server to start at boot:

systemctl enable grafana-server