This repository provides automation scripts to install and configure Prometheus and Node Exporter on Linux-based systems. The scripts handle system architecture detection, package installations, and the automatic setup of Prometheus and Node Exporter as systemd services.
- Prometheus installation: Installs the latest version of Prometheus, configures it, and sets up as a systemd service.
- Node Exporter installation: Installs the latest version of Node Exporter to monitor system metrics such as CPU, memory, and disk usage.
- Automatic package installation: Detects your system's package manager (APT, YUM, DNF) and installs the required dependencies.
- Service setup: Configures Prometheus and Node Exporter as services, ensuring they start on boot.
- Architecture detection: Supports both
x86_64
andaarch64
architectures, ensuring compatibility across different hardware.
- A Linux-based system (Ubuntu, CentOS, Fedora, etc.)
- Sudo or root privileges for installing packages and creating system services.
To run the scripts, download the respective installation scripts from this repository, make them executable, and run the script. The script will:
- Detect your system architecture (
x86_64
oraarch64
). - Install the necessary dependencies like
curl
,jq
,wget
, andhttpd-tools
. - Download and install the latest versions of Prometheus and Node Exporter.
Run the script to install Prometheus:
bash <(curl -s https://raw.githubusercontent.com/catalogfi/Prometheus-Node_Exporter-Setup/refs/heads/main/prometheus_setup.sh)
Run the script to install Node Exporter:
bash <(curl -s https://raw.githubusercontent.com/catalogfi/Prometheus-Node_Exporter-Setup/refs/heads/main/node_exporter_setup.sh)
After running the installation scripts, you can verify that both Prometheus and Node Exporter are running with the following commands:
sudo systemctl status prometheus
sudo systemctl status node_exporter
- Prometheus Web UI: Once installed, you can access the Prometheus dashboard on your server's IP address on port
9090
(e.g.,http://<server-ip>:9090
). - Node Exporter Metrics: Node Exporter exposes system metrics on port
9100
(e.g.,http://<server-ip>:9100/metrics
).
To set up the Grafana dashboard and data source, run:
bash <(curl -s https://raw.githubusercontent.com/catalogfi/Prometheus-Node_Exporter-Setup/refs/heads/main/setup_dashboard_and_datasource.sh)
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to open an issue or a pull request if you encounter any problems or have suggestions for improvements!