ashok-an/api_monitor
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
## 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`