Installation Prometheus - kwantu/platformconfiguration GitHub Wiki

back

Installation Prometheus

Create the prometheus user

Step 1 – Add Prometheus system user and group: This user will manage the exporter service.

sudo groupadd --system prometheus
sudo useradd -s /sbin/nologin --system -g prometheus prometheus

Installation for the node-exporter

Download and install

(Make sure that this is the latest)

wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
tar -xzvf node_exporter-1.5.0.linux-amd64.tar.gz
mv node_exporter-1.5.0.linux-amd64/node_exporter /usr/local/bin/node-exporter
chown prometheus:prometheus /usr/local/bin/node-exporter
chmod +x /usr/local/bin/node-exporter

Make sure that it works

node-exporter --version

Set up the service to start it with

Create a new service file:

sudo vim /etc/systemd/system/node-exporter.service

Add the following content

[Unit] Description=Prometheus Node Exporter After=network.target User=prometheus Group=prometheus

[Service] Type=simple Restart=always ExecStart=/usr/local/bin/node-exporter

[Install] WantedBy=multi-user.target

And now reload it

sudo systemctl daemon-reload sudo systemctl enable node-exporter sudo systemctl start node-exporter


## Installation for the couchdb-prometheus-exporter

### Download and install

(Make sure that this is the latest)

wget https://github.com/gesellix/couchdb-prometheus-exporter/releases/download/v30.5.0/couchdb-prometheus-exporter_30.5.0_Linux_x86_64.tar.gz tar -xzvf couchdb-prometheus-exporter_30.5.0_Linux_x86_64.tar.gz chown prometheus:prometheus couchdb-prometheus-exporter chmod +x couchdb-prometheus-exporter mv -f couchdb-prometheus-exporter /usr/local/bin/

Make sure that it works

couchdb-prometheus-exporter --version


### Set up the service to start it with

Create a new service file:

sudo vim /etc/systemd/system/couchdb-prometheus-exporter.service

Add the following content

[Unit]
Description=Prometheus Couchdb Exporter
After=network.target
User=prometheus
Group=prometheus

[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/couchdb-prometheus-exporter

[Install]
WantedBy=multi-user.target

And now reload it

sudo systemctl daemon-reload
sudo systemctl enable couchdb-prometheus-exporter
sudo systemctl start couchdb-prometheus-exporter