install.fairie/home/dot_local/etc/prometheus/private_prometheus.yml.tmpl

36 lines
1.1 KiB
Cheetah
Raw Normal View History

2024-01-02 17:40:12 -08:00
---
global:
scrape_interval: 30s
evaluation_interval: 30s
scrape_configs:
- job_name: 'statping'
scheme: https
scrape_interval: 30s
bearer_token: '{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "STATPING_API_SECRET")) }}{{ includeTemplate "secrets/STATPING_API_SECRET" | decrypt | trim }}{{ else }}{{ default "" (env "STATPING_API_SECRET") }}{{ end }}'
static_configs:
2024-01-12 23:47:07 -08:00
- targets: ['status.{{ .host.domain }}']
- job_name: 'juicefs-private'
scrape_interval: 15s
scheme: 'https'
metrics_path: '/api/vol/private/metrics'
params:
token: ['API_TOKEN']
static_configs:
- targets: ['juicefs.com']
- job_name: 'juicefs-public'
scrape_interval: 15s
scheme: 'https'
metrics_path: '/api/vol/public/metrics'
params:
token: ['API_TOKEN']
static_configs:
- targets: ['juicefs.com']
- job_name: 'juicefs-user'
scrape_interval: 15s
scheme: 'https'
metrics_path: '/api/vol/user/metrics'
params:
token: ['API_TOKEN']
static_configs:
- targets: ['juicefs.com']