This exposes metrics the same way the standard node_exporter does (a HTTP server on TCP port 9100) Thankfully, someone has already written a node_exporter package for OpenWRT. If you take a look at the releases page of the Prometheus node_exporter, the smallest binary available for Linux is already 7M. In total we have 64M of RAM available, and 4M of flash storage. Check our Prometheus monitoring guides.Swap: 0 0 0 ] ~ # df -hįilesystem Size Used Available Use% Mounted on You now have Prometheus installed on Debian 11 / Debian 10 Linux system. Restart Prometheus: sudo systemctl restart prometheus sudo tee /etc/systemd/system/node_rvice ` to any timeseries scraped from this config. tar -xvf node_exporter*.tar.gzĬonfirm installation. curl -s | grep browser_download_url|grep linux-amd64|cut -d '"' -f 4|wget -qi -Įxtract downloaded file and move the binary file to /usr/local/bin. sudo tee /etc/systemd/system/rviceĪug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.186Z caller=head.go:816 component=tsdb msg="Replaying on-disk memory mappable chunks if any"Īug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.187Z caller=head.go:830 component=tsdb msg="On-disk memory mappable chunks replay completed" duration=15.972µsĪug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.187Z caller=head.go:836 component=tsdb msg="Replaying WAL, this may take a while"Īug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.187Z caller=head.go:893 component=tsdb msg="WAL segment loaded" segment=0 maxSegment=0Īug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.188Z caller=head.go:899 component=tsdb msg="WAL replay completed" checkpoint_replay_duration=63.191µs wal_repl>Īug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.190Z caller=main.go:839 fs_type=EXT4_SUPER_MAGICĪug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.190Z caller=main.go:842 msg="TSDB started"Īug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.191Z caller=main.go:969 msg="Loading configuration file" filename=/etc/prometheus/prometheus.ymlĪug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.192Z caller=main.go:1006 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml>Īug 31 19:14:07 debian-bullseye-01 prometheus: level=info ts=T19:14:07.192Z caller=main.go:784 msg="Server is ready to receive web requests."Īccess Prometheus web interface on URL Step 6: Install node_exporter on Debian 11 / Debian 10ĭownload node_exporter archive. To be able to manage Prometheus service with systemd, you need to explicitly define this unit file. targets: 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. ![]() Rm -rf /tmp/prometheus Step 4: Create/Edit a Prometheus configuration file. sudo mv prometheus.yml /etc/prometheus/prometheus.ymlĪlso move consoles and console_libraries to / etc/prometheus directory: sudo mv consoles/ console_libraries/ /etc/prometheus/ 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. tar xvf prometheus*.tar.gzĬd prometheus*/ 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 -Įxtract the file. 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. sudo mkdir /var/lib/prometheusįor i in rules rules.d files_sd do sudo mkdir -p /etc/prometheus/$ done Step 3: Download and Install Prometheus on Debian 11 / Debian 10 Create all required directories using the commands below. 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
0 Comments
Leave a Reply. |