11---
2- title : How to run Pactus Metrics?
2+ title : Run Pactus Metrics
33weight : 9
44---
55
@@ -17,20 +17,20 @@ Before proceeding with the steps below, ensure that you have the following:
1717
1818## Configure Pactus Node for Metrics
1919
20- To Configure the Pactus Node for Metrics , navigate to the Pactus directory; by default, it’s located at the following path.
20+ To configure the Pactus node for metrics , navigate to the Pactus directory. By default, it’s located at:
2121
2222``` text
2323/home/YourUsername/pactus
2424```
2525
2626There’s a file named ` config.toml ` that contains all the configurations for your node.
27- There are two parameters that you should enable for metrics: the first is ` enable_metrics ` ,
28- and the second is enable ` http ` . After editing the ` config.toml ` you should restart your node.
29- The metrics now can be accessed at ` http://localhost:80/metrics/prometheus ` (this url going to be use by prometheus ).
27+ Enable two parameters for metrics: ` enable_metrics ` and ` http.enable ` .
28+ After editing ` config.toml ` , restart your node.
29+ Metrics are available at ` http://localhost:80/metrics/prometheus ` (this URL will be used by Prometheus ).
3030
3131{{< callout type="info" >}}
3232
33- if you are running Pactus with docker image, make sure to expose :80 port.
33+ If you are running Pactus with the Docker image, make sure to expose port 80 .
3434
3535{{< /callout >}}
3636
@@ -70,9 +70,8 @@ volumes: prom_data
7070` ` `
7171
7272You can change the default username and password of Grafana by modifying the values of ` GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD`.
73- Now, save the file. Then, in the current directory (meaning you are inside the `prometheus-grafana` directory),
74- create another directory named `grafana`. Then, go to the directory. So now you're in the path `/prometheus-grafana/grafana/`.
75- In the current directory, create a file named `datasource.yml` and paste the code below there.
73+ Save the file. From the same `prometheus-grafana` directory, create a `grafana` directory and enter it (`/prometheus-grafana/grafana/`).
74+ In that directory, create a file named `datasource.yml` and paste the code below.
7675
7776` ` ` yaml
7877apiVersion: 1
@@ -86,10 +85,9 @@ datasources:
8685 editable: true
8786` ` `
8887
89- Then save the file and exit.
90- Now, we should go up one directory level from the current directory and navigate to the `/prometheus-grafana` directory.
91- In the current directory, which is `/prometheus-grafana`, create another directory named `prometheus`,
92- then go into the directory.In the prometheus directory create a file named `prometheus.yml` and paste below code there.
88+ Save the file and exit.
89+ Go up one directory level back to `/prometheus-grafana`.
90+ Create a `prometheus` directory, enter it, and create a file named `prometheus.yml` with the content below.
9391
9492` ` ` yaml
9593global:
@@ -119,10 +117,10 @@ Then save the file and exit.
119117
120118{{< callout type="info" >}}
121119
122- Tip : In the last section of the code, you will see the targets section where I've written 127.0.0.1.
123- You can change it based on your localhost IP or your website domain.
124- Please be aware that your target should match with your node http port.
125- The default http port of pactus node is 80.
120+ Tip : In the last section of the code, you will see the targets section where 127.0.0.1 is set .
121+ You can change it based on your localhost IP or your domain.
122+ Please ensure that your target matches your node's HTTP port.
123+ The default HTTP port of a Pactus node is 80.
126124
127125{{< /callout >}}
128126
0 commit comments