Prometheus

This commit is contained in:
nora 2024-03-31 16:28:46 +02:00
parent a61ddf813c
commit 861ddee778
3 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,12 @@
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
scrape_configs:
- job_name: 'bisect'
static_configs:
- targets: ['cargo_bisect_rustc_service:4001']

View file

@ -15,6 +15,26 @@
hour: "7"
job: "/apps/backup.sh"
#####
# APP: prometheus, /apps/prometheus
- name: Create /apps/prometheus
ansible.builtin.file:
path: "/apps/prometheus"
state: directory
mode: "u=rwx,g=rx,o=rx"
- name: Copy Prometheus config
ansible.builtin.copy:
dest: /apps/prometheus/prometheus.yml
src: ../apps/prometheus/prometheus.yml
mode: "u=r,g=r,o=r"
owner: 1001
- name: Create /apps/prometheus/data
ansible.builtin.file:
path: "/apps/prometheus/data"
state: directory
mode: "u=rwx,g=rx,o="
owner: 1001
#####
#####
# APP: docker registry, /apps/registry
#####
- name: Create /apps/registry

View file

@ -10,6 +10,15 @@ services:
- "/apps/registry/htpasswd:/htpasswd"
ports:
- "5000:5000"
prometheus:
container_name: prometheus
restart: always
image: bitnami/prometheus:2.51.1
volumes:
- "/apps/prometheus/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml"
- "/apps/prometheus/data:/opt/bitnami/prometheus/data"
networks:
- prometheus
widetom:
container_name: widetom
image: "docker.nilstrieb.dev/widetom:490c94ca"
@ -30,7 +39,7 @@ services:
KILLUA_JSON_PATH: /app/config/trivia_questions.json
cargo_bisect_rustc_service:
container_name: cargo-bisect-rustc-service
image: "docker.nilstrieb.dev/cargo-bisect-rustc-service:13f89b68"
image: "docker.nilstrieb.dev/cargo-bisect-rustc-service:316a4044"
restart: always
volumes:
- "/apps/bisect-rustc-service/db.sqlite:/home/bisector/db.sqlite"
@ -38,6 +47,8 @@ services:
SQLITE_DB: /home/bisector/db.sqlite
ports:
- "5005:4000"
networks:
- prometheus
#### Hugo Chat
hugo_chat_db:
container_name: hugo-chat-db
@ -215,3 +226,4 @@ networks:
hugo-chat:
karin-bot:
openolat-network:
prometheus: