![]() To be able to manage Prometheus service with systemd, you need to explicitly define this unit file. Step 5: Create a Prometheus systemd Service unit file # 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: # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. # 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. The default configuration file looks similar to below. Prometheus configuration file will be located under /etc/prometheus/prometheus.yml. Step 4: Create/Edit a Prometheus configuration file. Sudo mv consoles/ console_libraries/ /etc/prometheus/ Sudo mv prometheus.yml /etc/prometheus/prometheus.ymlĪlso move consoles and console_libraries to /etc/prometheus directory: Move prometheus configuration template to /etc directory. Sudo mv prometheus promtool /usr/local/bin/ ![]() Since /usr/local/bin/ is in your PATH, let’s copy binary files to it. Move the prometheus binary files to /usr/local/bin/ ![]() Mkdir -p /tmp/prometheus & cd /tmp/prometheusĬurl -s |grep browser_download_url|grep linux-amd64|cut -d '"' -f 4|wget -qi. You can check releases from Prometheus releases Github page. Let’s download the latest release of Prometheus archive and extract it to get binary files. Step 3: Download and Install Prometheus on Debian 11 / Debian 10 Create all required directories using the commands below.įor i in rules rules.d files_sd do sudo mkdir -p /etc/prometheus/$i done Prometheus needs directories to store data and configuration files. Step 2: Create configuration and data directories This creates a system user which doesn’t need /bin/bash shell, that’s why we used -s /sbin/nologin. Sudo useradd -s /sbin/nologin -system -g prometheus prometheus The -r or –system option is used for this purpose. We’ll create a dedicated Prometheus system user and group. ![]() Step 1: Create Prometheus system user / group Since this is a binary installation method, there is no required dependency to continue with the setup. In this guide, we will cover the installation of Prometheus and node_exporter on Debian 11 / Debian 10. Its web interface enables you to perform powerful queries, visualize collected data, and to configure alerts. Prometheus is a free and open source monitoring system that enables you to collect time-series data metrics from any target systems. How To Install Prometheus on Debian 11| Debian 10 Linux?. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |