Prometheus

From Nick's Personal Wiki
Revision as of 01:52, 28 March 2026 by Nick (talk | contribs) (Created page with "Placeholder text. =Prometheus= ==Downloading Prometheus== You may need to check the Prometheus documentation/downloads for the latest version [https://prometheus.io/downloa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Placeholder text.

Prometheus

Downloading Prometheus

You may need to check the Prometheus documentation/downloads for the latest version here.

Copy the URL for the version you need from that page (should be a Github link) and paste it into the below:

wget INSERT_LINK_HERE

Extract the file:

tar xfvz prometheus-WHATEVER-VERSION-YOU-HAVE.tar.gz


Creating Prometheus User

Create a user account for Prometheus, without a home folder and with a nologin shell:

sudo useradd --no-create-home --shell /usr/sbin/nologin prometheus<nowiki>


==Create Prometheus Directories==

Create the below directories:
 <nowiki>sudo mkdir -p /etc/prometheus /var/lib/prometheus

Copy the two files below, from within the 'prometheus-WHATEVER-VERSION-YOU-HAVE' directory, to '/usr/local/bin/'

sudo cp prometheus /usr/local/bin/
sudo cp promtool /usr/local/bin/

Change ownership of the files to the prometheus user we created:

sudo chown prometheus:prometheus /usr/local/bin/prometheus /usr/local/bin/promtool


Copy the below directories, again from within the 'prometheus-WHATEVER-VERSION-YOU-HAVE' directory, to the '/etc/prometheus/' directory:

sudo cp -r consoles/ /etc/prometheus/
sudo cp -r console_libraries/ /etc/prometheus/

Create Systemd Service for Prometheus

Configure Prometheus