,---, ,-.
.' .' `\ ,--/ /|
,---.' \ ,---. ,--. :/ | __ ,-.
| | .`\ | ' ,'\ : : ' / ,' ,'/ /|
: : | ' | / / | ,---. | ' / ,---. ' | |' |
| ' ' ; : . ; ,. : / \ ' | : / \ | | ,'
' | ; . | ' | |: : / / ' | | \ / / | ' : /
| | : | ' ' | .; : . ' / ' : |. \ . ' / | | | '
' : | / ; | : | ' ; :__ | | ' \ \ ' ; /| ; : |
| | '` ,/ \ \ / ' | '.'| ' : |--' ' | / | | , ;
; : .' `----' | : : ; |,' | : | ---'
| ,.' \ \ / '--' \ \ /
'---' `----' `----'
_____ _
| __ \ | |
| | \/ __ _ | |_ ___ __ __ __ _ _ _
| | __ / _` || __| / _ \\ \ /\ / / / _` || | | |
| |_\ \| (_| || |_ | __/ \ V V / | (_| || |_| |
micrOS \____/ \__,_| \__| \___| \_/\_/ \__,_| \__, |
__/ |
|___/
#gateway #grafana # prometheus
docker-compose -p gateway up -d
Prometheus scraper config example: prometheus.yml
Grafana dasboard examples.json
Change GATEWAYIP=10.0.1.1 to your router IP, where the host machine and micrOS endpoints are connected. Chnage API_AUTH=: for basic auth, or remove param if you don't need basic auth.
Without BasicAuth
docker run --name micros-gateway -p 5000:5000 -e GATEWAYIP="10.0.1.1" -d bxnxm/micros-gateway:1.55.4
With BasicAuth
docker run --name micros-gateway -p 5000:5000 -e GATEWAYIP="10.0.1.1" -e API_AUTH=usr:pwd -d bxnxm/micros-gateway:1.55.4
docker build --no-cache -t micros-gateway:1.0 .
docker run --name micros-gateway -p 5000:5000 -e GATEWAYIP="10.0.1.1" -d micros-gateway:1.0
docker images
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' micros-gateway
docker ps -a
docker stop <container_id>
docker start <container_id>
docker exec -it micros-gateway /bin/bash
docker image rm <image_id>
docker network ls
docker network inspect bridge
______ _ _
| ___ \ | | | |
| |_/ / _ __ ___ _ __ ___ ___ | |_ | |__ ___ _ _ ___
| __/ | '__| / _ \ | '_ ` _ \ / _ \| __|| '_ \ / _ \| | | |/ __|
| | | | | (_) || | | | | || __/| |_ | | | || __/| |_| |\__ \
\_| |_| \___/ |_| |_| |_| \___| \__||_| |_| \___| \__,_||___/
docker run --name prometheus -d -p 9090:9090 -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
docker run --name prometheus -d -p 9090:9090 -p 5000:5000 -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' prometheus
Graphana
docker run -d --name grafana -p 3000:3000 -e "GF_SERVER_ROOT_URL=http://localhost:3000" --network micros_micros_nw --link prometheus:prometheus grafana/grafana
,----.. ____
/ / \ ,' , `. ,-.----.
| : : ,---. ,-+-,.' _ | \ / \ ,---.
. | ;. / ' ,'\ ,-+-. ; , || | : | ' ,'\ .--.--.
. ; /--` / / | ,--.'|' | || | | .\ : / / | / / ' ,---.
; | ; . ; ,. : | | ,', | |, . : |: | . ; ,. : | : /`./ / \
| : | ' | |: : | | / | |--' | | \ : ' | |: : | : ;_ / / |
. | '___ ' | .; : | : | | , | : . | ' | .; : \ \ `. . ' / |
' ; : .'| | : | | : | |/ : |`-' | : | `----. \ ' ; /|
' | '/ : \ \ / | | |`-' : : : \ \ / / /`--' / ' | / |
| : / `----' | ;/ | | : `----' '--'. / | : |
\ \ .' '---' `---'.| `--'---' \ \ /
`---` `---` `----'
docker-compose -p micros up -d
docker-compose up --force-recreate -p micros -d
docker-compose -p micros down
docker-compose -p micros up
docker-compose restart prometheus
_ _ ______ _
| | | || ___ \| |
| | | || |_/ /| | ___
| | | || / | | / __|
| |_| || |\ \ | |____\__ \
\___/ \_| \_|\_____/|___/ hints
Prometheus: http://10.0.1.61:9090 micrOS gateway for Prometheus: http://10.0.1.61:5000/metrics/TinyDevBoard/esp32+temp