updates from the day

This commit is contained in:
oliver 2024-10-06 01:54:18 +00:00
parent 65c3839185
commit 01af77e01f
3 changed files with 15 additions and 0 deletions

View File

@ -18,14 +18,18 @@ services:
- 9090
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
# persist data
- prometheus_storage:/prometheus
depends_on:
- caddy
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
# log viewer
grafana:
image: grafana/grafana:latest
volumes:
- ./grafana.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
- grafana_storage:/var/lib/grafana
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
@ -33,3 +37,7 @@ services:
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
depends_on:
- prometheus
volumes:
prometheus_storage:
grafana_storage:

3
deploy-node.sh Executable file
View File

@ -0,0 +1,3 @@
wget https://git.oliveratkinson.net/Oliver/linux-node-visability/raw/branch/master/compose-node.yml
sudo ufw allow from 10.50.50.0/24 to any port 9100
docker compose -f compose-node.yml up -d

4
reload-prom.sh Executable file
View File

@ -0,0 +1,4 @@
IP=$(sudo docker ps | grep prometheus | grep -v node | awk '{print $1}' | xargs -I{} sudo docker inspect {} | grep IPAddress | tail -n 1 | awk '{print $2}' | sed -n '1 s/"//gp' | sed -n '1 s/,//gp')
echo $IP
curl -X POST http://$IP:9090/-/reload