We're here to assist with any of your needs, don't hestitate to reach out.
Prometheus is an open-source monitoring and alerting system that allows you to collect and store metrics from various systems and services. It provides a powerful query language, a flexible data model, and an easy-to-use web interface for visualizing and exploring collected data.
Here are the steps to install Prometheus on CentOS 7:
sudo yum update -y
sudo useradd -M -r -s /bin/false prometheus
cd /tmp wget https://github.com/prometheus/prometheus/releases/download/v2.33.1/prometheus-2.33.1.linux-amd64.tar.gz tar xvf prometheus-2.33.1.linux-amd64.tar.gz
sudo mv prometheus-2.33.1.linux-amd64/{prometheus,promtool} /usr/local/bin/ sudo mv prometheus-2.33.1.linux-amd64/{consoles,console_libraries} /etc/prometheus/
sudo chown -R prometheus:prometheus /usr/local/bin/{prometheus,promtool} sudo chown -R prometheus:prometheus /etc/prometheus/{consoles,console_libraries}
sudo nano /etc/prometheus/prometheus.yml
global: scrape_interval: 15s scrape_configs: - job_name: 'prometheus' scrape_interval: 5s static_configs: - targets: ['localhost:9090']
sudo nano /etc/systemd/system/prometheus.service
[Unit] Description=Prometheus Documentation=https://prometheus.io/docs/introduction/overview/ Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \ --config.file /etc/prometheus/prometheus.yml \ --storage.tsdb.path /var/lib/prometheus \ --web.console.templates=/etc/prometheus/consoles \ --web.console.libraries=/etc/prometheus/console_libraries [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl start prometheus sudo systemctl enable prometheus
After completing these steps, Prometheus should be up and running on your CentOS 7 system. You can access the web interface by visiting http://localhost:9090.
Remember to configure appropriate firewall rules and secure access to Prometheus as needed for your specific environment.
I hope this guide helps you successfully install Prometheus on CentOS 7!
What our customers say about us
Create your free account today.