You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -51,13 +51,21 @@ docker run hello-world
51
51
ssh azureuser@<your-azure-vm-ip>
52
52
```
53
53
54
-
### Step 2: Create a monitoring folder
54
+
### Step 2: Go to prometheus folder
55
55
```bash
56
-
mkdir ~/monitoring &&cd~/monitoring
56
+
cdprometheus
57
57
```
58
58
59
59
### Step 3: Create Prometheus config file
60
-
Create a file named `prometheus.yml`:
60
+
Observe file named `prometheus.yml`:
61
+
Importance of prometheus.yml:
62
+
1. Its is main configuration file for prometheus
63
+
2. Prometheus doesn't magically know what to monitor - it needs this configure to define:
64
+
* Which target(apps/container/hosts) to scrape
65
+
* Howfrequently to scrape them
66
+
3. Tells prometheus what to monitor.
67
+
68
+
Thus file place crucial role. It helps
61
69
See example from my prometheus folder
62
70
```yaml
63
71
global:
@@ -70,11 +78,23 @@ scrape_configs:
70
78
static_configs:
71
79
- targets: ['cadvisor:9323']
72
80
```
73
-
### Step 4: Create Docker Network
74
-
Docker network helps the containers in docker to communicate with each, this docker network is used among all.
75
-
Create docker network if not created. It is created in `Github Actions` ci-cd pipeline. Check with this command. `
81
+
### Step 4: Docker Network
82
+
Docker network helps the containers in docker to communicate with each, this docker network is used among all. It is used of service discovery, as containers can reach each other by name.
83
+
Create docker network if not created. It is created in `Github Actions` ci-cd pipeline. Check with this command.
0 commit comments