-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
28 lines (18 loc) · 757 Bytes
/
README
File metadata and controls
28 lines (18 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Install Python packages
> pip install requests_jwt
> pip install prometheus_client
## Installing prometheus infra
1. cd <git-clone-dir>
2. Activate prometheus container
> docker run -d -p 9090:9090 -v ${PWD}/prometheus-config:/promdata prom/prometheus --config.file=/promdata/prometheus.yml
Check: <host-ip>:9090
3. Activate prometheus pushgateway
> docker run -d -p 9091:9091 prom/pushgateway
Check: <host-ip>:9091/metrics
## Install grafana
> docker run -d -p 3000:3000 -e "GF_SECURITY_ADMIN_PASSWORD=arpeggio" grafana/grafana
Check: <host-ip>:3000 #login with **admin** | **arpeggio**
## Schematic
[service_status|user_count] --PUSH-> [gateway:9091] <-PULL-- [prometheus:9090]
### For unbuffered python output
> export PYTHONUNBUFFERED=1`