How to Install Prometheus on Fedora CoreOS Latest?

Prometheus is an open-source monitoring system that is designed to collect and query metrics from various sources. It has become one of the most widely used monitoring systems and is widely adopted by companies and organizations worldwide. In this tutorial, we will show you how to install Prometheus on Fedora CoreOS latest.

Prerequisites

Before proceeding with the installation, make sure the following prerequisites are met:

Step 1: Install Prometheus

  1. First, you will need to download the latest version of Prometheus from the official website using the wget command:
wget https://github.com/prometheus/prometheus/releases/download/v2.30.3/prometheus-2.30.3.linux-amd64.tar.gz
  1. Once the download is complete, extract the Prometheus archive file:
tar -xvf prometheus-2.30.3.linux-amd64.tar.gz
  1. Move the extracted directory to the /opt/prometheus directory:
sudo mv prometheus-2.30.3.linux-amd64 /opt/prometheus

Step 2: Configure Prometheus

  1. After the installation is complete, navigate to the /opt/prometheus directory:
cd /opt/prometheus
  1. Open the Prometheus configuration file using your preferred text editor:
sudo nano prometheus.yml
  1. Configure the file to include the targets you want to monitor by specifying a job_name for each target:
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: 'node'
    static_configs:
      - targets: ['localhost:9100']
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

In the above example, we are monitoring node and prometheus. Ensure that you edit the file to include the targets you wish to monitor.

Step 3: Run Prometheus

  1. To run Prometheus, navigate to the /opt/prometheus directory:
cd /opt/prometheus
  1. Start the Prometheus server by running the following command:
./prometheus --config.file=prometheus.yml
  1. Open your web browser and navigate to http://<your-server-ip>:9090/ to access the Prometheus web interface.

Conclusion

In this tutorial, we learned how to install and configure Prometheus on Fedora CoreOS latest. We explained how to download and extract the Prometheus archive, how to configure the Prometheus configuration file, and how to run the Prometheus server. With Prometheus running, you can now start monitoring the targets you defined in the configuration file.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!