That's it! Prometheus should now be scraping metrics from Node Exporter. Restart your Prometheus server to apply these changes. If Prometheus and Node Exporter are running on the same machine, you can use localhost or 127.0.0.1. Replace with the IP address of the machine where Node Exporter is running. In your Prometheus configuration file ( prometheus.yml), add the following job: scrape_configs: - job_name: 'node' scrape_interval: 5s static_configs: - targets: Now that Node Exporter is running and exposing metrics, you need to configure Prometheus to scrape these metrics. If you want to set up Prometheus using Docker, check out our guide. If Node Exporter is running properly, you should see a list of metrics being exposed.Īlternatively, you can use the curl command in the terminal: curl Step 4: Configuring Prometheus to scrape Node Exporter metrics You can verify that Node Exporter is running and exposing metrics by navigating to in your browser. Step 3: Verify that Node Exporter is running Prom/node-exporter: This is the image that we pulled in the previous step. name=node_exporter: This assigns a name to the container. p 9100:9100: This maps the host's port 9100 to the container's port 9100. d: This option runs the container in the background (detached mode). docker run -d -p 9100:9100 -name=node_exporter prom/node-exporter This is the default port Node Exporter uses to expose metrics. The following command will create and run a new Docker container named node_exporter, mapping the container's port 9100 to the host's port 9100. Step 2: Run the Node Exporter containerĪfter pulling the image, the next step is to run the Node Exporter within a Docker container. If you need a specific version, append : at the end of the image name, like prom/node-exporter:v1.1.2. This command will download the latest version of Node Exporter. Run the following command in your terminal: docker pull prom/node-exporter The first step is to pull the official Prometheus Node Exporter Docker image from Docker Hub. Step-by-step Guide Step 1: Pull the Node Exporter Docker image Follow the instructions based on your operating system (Windows, MacOS, or Linux).īasic knowledge of command-line interface. If you don't, you can download it from the official Docker website here. Make sure you have Docker installed on your system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |