5/16/2023 0 Comments Node exporterjob_name: 'node_exporter_metrics' scrape_interval: 5s static_configs: - targets: Add the node exporter installed server as a target under scrape configs.Log in to the Prometheus server and follow the below steps We are not covering Prometheus installation and configuration in this article, you can check that here □ Note: This configuration should be done in the Prometheus server So now we are adding this server as a target in the Prometheus to query metrics and create alerts Now you can able to see the metrics on port 9100, open the browser to see the metrics.Sudo systemctl daemon-reload sudo systemctl start node_exporter Reload system-daemon and start node_exporter.Description=Node Exporter After=network.target User=node_exporter Group=node_exporter Type=simple ExecStart=/usr/local/bin/node_exporter WantedBy=multi-user.target Add the below content in the file (/etc/systemd/system/node_rvice).Note: in vim use “i” for insert mode, “escape + wq!” To save and exit Sudo useradd -rs /bin/false node_exporter Sudo mv node_exporter-1.4.0.linux-amd64/node_exporter /usr/local/bin/ Move the node exporter binary to /usr/local/bin directory :.Download the latest version of node-exporter from the Prometheus release page using the below command :.If you want to monitor your server's system metrics like CPU, memory, disk usage, etc… Then node-exporter is best because it can collect all the system metrics and expose them on port 9100, if you want to collect system metrics using node-exporter then you need to install the node-exporter in all the servers whichever you want to monitor.īelow are the installation and configuration steps. Exporting system metrics with node-exporter :. In this article we have covered How to monitor Linux server using Prometheus and Node Exporter/ Install Prometheus Node Exporter on Linux (Ubuntu, RedHat/CentOS/Amazon Linux2). Hit the URL in your web browser to check weather our target is successfully scraped by Prometheus or not target 2 Now restart the Prometheus Service sudo systemctl restart prometheus Now to scrape the node_exporter lets instruct the Prometheus by making a minor change in prometheus.yml file sudo nano /etc/prometheus/prometheus.yml -job_name: 'Node_Exporter'Īfter changing in config file you need to restart to prometheus # 3.Configure the Node Exporter as a Prometheus target You can see all the server metrics by visiting your server URL on /metrics as shown below. Now, node exporter would be exporting metrics on port 9100. Lets Check the Status of Node Exorter: sudo systemctl status node_exporter node exporter Now lets start and enable the node_exporter service using below commands sudo systemctl daemon-reload sudo systemctl enable node_exporter sudo systemctl start node_exporter Paste the below content in your service file sudo useradd -rs /bin/false node_exporter # 2.Create a node_exporter service file in the /etc/systemd/system directory sudo nano /etc/systemd/system/node_rvice sudo mv node_exporter-*.*-amd64/node_exporter /usr/local/bin/Ĭreate a node_exporter user to run the node exporter service. Move the binary file of node exporter to /usr/local/bin location. Unzip the downloaded the file using below command tar xvfz node_exporter-*.* Now lets run the copied URL with wget command cd /tmp wget Now right click on node exporter and copy link address node exporter To install Node Exporter first navigate to Prometheus official download page, Scroll down and you will get node_exporter section and then select Linux OS for amd64. Node Exporter collects the metrics of your system such as Memory usage, CPU usage, RAM, disk space, etc. #1.Download and Install Prometheus Node Exporter on Linux Security Groups Configured on EC2 Instances
0 Comments
Leave a Reply. |