Skip to content

Commit 52eadcd

Browse files
authored
Update README.md
1 parent d51730c commit 52eadcd

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,21 @@ docker run hello-world
5151
ssh azureuser@<your-azure-vm-ip>
5252
```
5353

54-
### Step 2: Create a monitoring folder
54+
### Step 2: Go to prometheus folder
5555
```bash
56-
mkdir ~/monitoring && cd ~/monitoring
56+
cd prometheus
5757
```
5858

5959
### 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
6169
See example from my prometheus folder
6270
```yaml
6371
global:
@@ -70,11 +78,23 @@ scrape_configs:
7078
static_configs:
7179
- targets: ['cadvisor:9323']
7280
```
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.
7684
```bash
77-
docker network create devops-net
85+
docker network ls
86+
```
87+
You will output like
88+
```
89+
NETWORK ID NAME DRIVER SCOPE
90+
2c0c2e5e7a0b bridge bridge local
91+
d38e6e1e8abc host host local
92+
8f3e7f6ef02f none null local
93+
3c1e6fc7d0de devops-net bridge local
94+
```
95+
If it is not created, create one
96+
```bash
97+
docker network create docker-net
7898
```
7999
### Step 5: Run Prometheus and Grafana in Docker
80100
```bash

0 commit comments

Comments
 (0)