2026-01-15 12:24:13 -08:00
|
|
|
---
|
|
|
|
|
# Grafana Alloy configuration
|
2026-01-22 12:06:02 -08:00
|
|
|
#
|
|
|
|
|
# BUILDING FROM SOURCE (required for CGO DNS resolution on macOS):
|
|
|
|
|
#
|
|
|
|
|
# Alloy must be built with CGO_ENABLED=1 to use macOS native DNS resolver,
|
|
|
|
|
# which is required for Tailscale MagicDNS hostname resolution.
|
|
|
|
|
# The Homebrew bottle is built with CGO_ENABLED=0.
|
|
|
|
|
#
|
|
|
|
|
# Build on dev machine (gilbert), then copy to indri:
|
|
|
|
|
#
|
|
|
|
|
# 1. Clone from forge mirror:
|
2026-02-25 06:55:53 -08:00
|
|
|
# git clone ssh://forgejo@forge.ops.eblu.me:2222/mirrors/alloy.git ~/code/3rd/alloy
|
2026-01-22 12:06:02 -08:00
|
|
|
#
|
|
|
|
|
# 2. Set up build tools via mise:
|
2026-03-13 16:25:27 -07:00
|
|
|
# cd ~/code/3rd/alloy && mise use go@1.25.7 node yarn
|
2026-01-22 12:06:02 -08:00
|
|
|
#
|
|
|
|
|
# 3. Build with CGO enabled (default in Makefile):
|
|
|
|
|
# cd ~/code/3rd/alloy && mise x -- make alloy
|
|
|
|
|
#
|
|
|
|
|
# 4. Copy binary to indri:
|
|
|
|
|
# scp ~/code/3rd/alloy/build/alloy indri:~/.local/bin/alloy
|
|
|
|
|
#
|
2026-03-13 16:25:27 -07:00
|
|
|
# 5. Ad-hoc codesign on indri (SCP'd binaries get quarantined by macOS):
|
|
|
|
|
# ssh indri 'codesign --sign - --force ~/.local/bin/alloy'
|
|
|
|
|
#
|
|
|
|
|
# 6. Run ansible to deploy config and LaunchAgent
|
2026-01-22 12:06:02 -08:00
|
|
|
|
|
|
|
|
# Binary and paths
|
|
|
|
|
alloy_binary: /Users/erichblume/.local/bin/alloy
|
|
|
|
|
alloy_config_dir: /Users/erichblume/.config/grafana-alloy
|
|
|
|
|
alloy_data_dir: /Users/erichblume/.local/share/grafana-alloy
|
|
|
|
|
alloy_log_dir: /Users/erichblume/Library/Logs
|
2026-01-15 12:24:13 -08:00
|
|
|
|
|
|
|
|
# Textfile collector directory (same as node_exporter for compatibility)
|
|
|
|
|
alloy_textfile_dir: /opt/homebrew/var/node_exporter/textfile
|
|
|
|
|
|
2026-01-25 12:56:31 -08:00
|
|
|
# Prometheus remote write endpoint (k8s via Caddy)
|
|
|
|
|
alloy_prometheus_url: "https://prometheus.ops.eblu.me/api/v1/write"
|
2026-01-15 12:24:13 -08:00
|
|
|
|
2026-01-25 12:56:31 -08:00
|
|
|
# Loki endpoint (k8s via Caddy)
|
|
|
|
|
alloy_loki_url: "https://loki.ops.eblu.me/loki/api/v1/push"
|
2026-01-15 12:24:13 -08:00
|
|
|
|
|
|
|
|
# Instance label for metrics
|
|
|
|
|
alloy_instance_label: indri
|
|
|
|
|
|
|
|
|
|
# Scrape interval
|
|
|
|
|
alloy_scrape_interval: "15s"
|
|
|
|
|
|
|
|
|
|
# Log paths to collect
|
|
|
|
|
alloy_brew_logs:
|
|
|
|
|
- path: /opt/homebrew/var/log/forgejo.log
|
|
|
|
|
service: forgejo
|
|
|
|
|
stream: stdout
|
|
|
|
|
- path: /opt/homebrew/var/log/tailscaled.log
|
|
|
|
|
service: tailscale
|
|
|
|
|
stream: stdout
|
|
|
|
|
|
|
|
|
|
alloy_mcquack_logs:
|
2026-01-22 12:06:02 -08:00
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.alloy.out.log
|
|
|
|
|
service: alloy
|
2026-01-15 12:24:13 -08:00
|
|
|
stream: stdout
|
2026-01-22 12:06:02 -08:00
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.alloy.err.log
|
|
|
|
|
service: alloy
|
2026-01-15 12:24:13 -08:00
|
|
|
stream: stderr
|
|
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.borgmatic.out.log
|
|
|
|
|
service: borgmatic
|
|
|
|
|
stream: stdout
|
|
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.borgmatic.err.log
|
|
|
|
|
service: borgmatic
|
|
|
|
|
stream: stderr
|
2026-01-18 12:06:28 -08:00
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.zot.out.log
|
|
|
|
|
service: zot
|
|
|
|
|
stream: stdout
|
|
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.zot.err.log
|
|
|
|
|
service: zot
|
|
|
|
|
stream: stderr
|
2026-01-30 16:57:26 -08:00
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.jellyfin.out.log
|
|
|
|
|
service: jellyfin
|
|
|
|
|
stream: stdout
|
|
|
|
|
- path: /Users/erichblume/Library/Logs/mcquack.jellyfin.err.log
|
|
|
|
|
service: jellyfin
|
|
|
|
|
stream: stderr
|
2026-01-15 12:24:13 -08:00
|
|
|
|
|
|
|
|
# Enable log collection (requires Loki to be running)
|
|
|
|
|
alloy_collect_logs: true
|
2026-01-16 12:30:20 -08:00
|
|
|
|
2026-01-18 12:06:28 -08:00
|
|
|
# Zot registry metrics collection
|
|
|
|
|
alloy_collect_zot: true
|
|
|
|
|
alloy_zot_metrics_url: "http://localhost:5050/metrics"
|
|
|
|
|
|
2026-01-22 12:06:02 -08:00
|
|
|
# PostgreSQL metrics collection (disabled, CNPG metrics scraped directly by k8s Prometheus)
|
2026-01-20 09:04:47 -08:00
|
|
|
alloy_collect_postgres: false
|
2026-01-16 12:30:20 -08:00
|
|
|
alloy_postgres_host: localhost
|
|
|
|
|
alloy_postgres_port: 5432
|
|
|
|
|
alloy_postgres_user: alloy
|
|
|
|
|
alloy_postgres_database: postgres
|
|
|
|
|
|
2026-01-20 09:04:47 -08:00
|
|
|
# 1Password settings for PostgreSQL metrics (unused when alloy_collect_postgres is false)
|
2026-01-16 12:30:20 -08:00
|
|
|
alloy_op_vault: vg6xf6vvfmoh5hqjjhlhbeoaie
|
|
|
|
|
alloy_op_postgres_item: guxu3j7ajhjyey6xxl2ovsl2ui
|
|
|
|
|
alloy_op_postgres_field: alloy-user-pw
|
2026-01-22 17:30:08 -08:00
|
|
|
|
2026-04-17 15:05:59 -07:00
|
|
|
# Forgejo metrics collection
|
|
|
|
|
alloy_collect_forgejo: true
|
|
|
|
|
alloy_forgejo_port: 3001
|
|
|
|
|
|
2026-01-22 17:30:08 -08:00
|
|
|
# macOS power metrics collection (via powermetrics, requires root)
|
|
|
|
|
alloy_collect_power_metrics: true
|
|
|
|
|
alloy_power_metrics_script: /usr/local/bin/macos-power-metrics
|
|
|
|
|
alloy_power_metrics_interval: 30 # seconds between collection
|