This will only monitor your local system only ( Prometheus Server). # The job name is added as a label `job=` to any timeseries scraped from this config. # A scrape configuration containing exactly one endpoint to scrape:# Here it's Prometheus itself. Scrape_timeout: 15s # scrape_timeout is set to the global default (10s). Default is every 1 minute.Įvaluation_interval: 15s # Evaluate rules every 15 seconds. Scrape_interval: 15s # Set the scrape interval to every 15 seconds. To start off with the configuration, create a file /etc/prometheus/prometheus.yml and paste the configuration in the file ~]# vi /etc/prometheus/prometheus.yml So, navigate to the extracted directory and copy them using the command: ~]# cd prometheus-2.14.0.linux-amd64]# cp prometheus /usr/local/binĭo likewise to the other binary file prometheus-2.14.0.linux-amd64]# cp promtool /usr/local/bin Step 4) Creating a configuration file for Prometheus ![]() The extracted directory contains 2 binary files prometheus & promtool and that we need to copy to the /usr/local/bin path. Use tree command to view directory structure, This will leave you with a directory called prometheus-2.14.0.linux-amd64 Once the download is complete, extract the tarball file as shown tmp]# tar -zxpvf prometheus-2.14.0. Alternatively, just run the command below ~]# dnf install wget ~]# wget -P /tmp At the time of penning down this article, the latest version was v 2.14.0. To get the latest version, head out to the Download page to obtain the latest version for your environment. With the directories in place, we can now download the Prometheus. ![]() Set the ownership on /var/lib/prometheus ~]# chown prometheus /var/lib/prometheus/ Step 3) Downloading Prometheus tar file So run the commands below: ~]# mkdir ~]# mkdir /var/lib/prometheus Once the user for Prometheus has been created, we are then going to create configuration directories in the /etc and /var directories which will store Prometheus configuration files and data. Step 2) Creating configuration directories for Prometheus
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |