Commit 6f96edd59d
Unsigned
Layout: unified · split
content/blog/2024-09-19-prometheus-grafana-cloud.org → content/blog/2024-09-20-prometheus-grafana-cloud.org renamed +7 −7
| @@ -66,7 +66,7 @@ containers that will work together to send metrics to Grafana. | |||
| 66 | 66 | ||
| 67 | Let's start by creating a working directory. | 67 | Let's start by creating a working directory. |
| 68 | 68 | ||
| 69 | #+begin_src shell | 69 | #+begin_src sh |
| 70 | mkdir ~/prometheus && \ | 70 | mkdir ~/prometheus && \ |
| 71 | cd ~/prometheus && \ | 71 | cd ~/prometheus && \ |
| 72 | nano compose.yml | 72 | nano compose.yml |
| @@ -135,7 +135,7 @@ services: | |||
| 135 | - monitoring | 135 | - monitoring |
| 136 | #+end_src | 136 | #+end_src |
| 137 | 137 | ||
| 138 | #+begin_src shell | 138 | #+begin_src sh |
| 139 | sudo docker compose up -d | 139 | sudo docker compose up -d |
| 140 | #+end_src | 140 | #+end_src |
| 141 | 141 | ||
| @@ -146,7 +146,7 @@ local firewall with =sudo ufw allow 8080=. | |||
| 146 | 146 | ||
| 147 | Next, let's create a =prometheus.yml= configuration file. | 147 | Next, let's create a =prometheus.yml= configuration file. |
| 148 | 148 | ||
| 149 | ,#+begin_src sh | 149 | #+begin_src sh |
| 150 | nano prometheus.yml | 150 | nano prometheus.yml |
| 151 | #+end_src | 151 | #+end_src |
| 152 | 152 | ||
| @@ -186,7 +186,7 @@ need to modify the Nginx configuration on the host. | |||
| 186 | More specifically, we need to create a path for the =stub_status= to be returned | 186 | More specifically, we need to create a path for the =stub_status= to be returned |
| 187 | when we query port 8080 on our localhost. | 187 | when we query port 8080 on our localhost. |
| 188 | 188 | ||
| 189 | #+begin_src shell | 189 | #+begin_src sh |
| 190 | sudo nano /etc/nginx/conf.d/default.conf | 190 | sudo nano /etc/nginx/conf.d/default.conf |
| 191 | #+end_src | 191 | #+end_src |
| 192 | 192 | ||
| @@ -201,7 +201,7 @@ server { | |||
| 201 | } | 201 | } |
| 202 | #+end_src | 202 | #+end_src |
| 203 | 203 | ||
| 204 | #+begin_src shell | 204 | #+begin_src sh |
| 205 | sudo systemctl restart nginx.service | 205 | sudo systemctl restart nginx.service |
| 206 | #+end_src | 206 | #+end_src |
| 207 | 207 | ||
| @@ -213,7 +213,7 @@ areas to check and see if any obvious errors exist. | |||
| 213 | Nginx: Curl the stub_status from the Nginx web server on the host machine to see | 213 | Nginx: Curl the stub_status from the Nginx web server on the host machine to see |
| 214 | if Nginx and stub_status are working properly. | 214 | if Nginx and stub_status are working properly. |
| 215 | 215 | ||
| 216 | #+begin_src shell | 216 | #+begin_src sh |
| 217 | curl http://127.0.0.1:8080/stub_status | 217 | curl http://127.0.0.1:8080/stub_status |
| 218 | 218 | ||
| 219 | # EXPECTED RESULTS: | 219 | # EXPECTED RESULTS: |
| @@ -251,7 +251,7 @@ go_gc_duration_seconds{quantile="0.5"} 4.8531e-05 | |||
| 251 | 251 | ||
| 252 | Node-Exporter: Curl the exporter node machine metrics. | 252 | Node-Exporter: Curl the exporter node machine metrics. |
| 253 | 253 | ||
| 254 | #+begin_src shell | 254 | #+begin_src sh |
| 255 | # Curl the exported Node metrics | 255 | # Curl the exported Node metrics |
| 256 | curl 192.168.64.3:9100/metrics | 256 | curl 192.168.64.3:9100/metrics |
| 257 | 257 | ||