37 lines
1.5 KiB
Django/Jinja
37 lines
1.5 KiB
Django/Jinja
# ==============================================================================
|
|
# FILE: roles/llm-inference-multimodel/templates/llama-swap-prometheus-scrape.yml.j2
|
|
# DESCRIPTION: Prometheus scrape job configuration for llama-swap's native
|
|
# /metrics endpoint (OpenMetrics format).
|
|
#
|
|
# This template is rendered and deployed to the Prometheus
|
|
# config via GitOps (cluster/applications/monitoring/values.yaml).
|
|
# Does NOT include this file inline here; it is referenced and
|
|
# rendered by Ansible roles/llm-inference-multimodel/tasks/*.yml.
|
|
#
|
|
# TARGET HOST: astro-orbiter ({{ llm_bind_address }}:{{ llm_swapmode_port }})
|
|
# METRICS: llamacpp_tokens_predicted_total, llamacpp_kv_cache_usage_ratio,
|
|
# llamacpp_time_predict_ms, llamacpp_queue_size, etc. (per llama.cpp)
|
|
#
|
|
# AUTHOR: Wong (Infrastructure Automation Specialist)
|
|
# DATE: 2026-08-18
|
|
# ==============================================================================
|
|
|
|
---
|
|
- job_name: llama-swap
|
|
static_configs:
|
|
- targets: ["{{ llm_bind_address }}:{{ llm_swapmode_port }}"]
|
|
labels:
|
|
component: llm-inference
|
|
service: llama-swap
|
|
environment: homelab
|
|
scrape_interval: 30s
|
|
scrape_timeout: 10s
|
|
honor_labels: true
|
|
metrics_path: /metrics
|
|
|
|
# Relabeling: extract model name from metric labels for dashboard grouping
|
|
metric_relabel_configs:
|
|
- source_labels: [__name__]
|
|
regex: 'llamacpp_.*'
|
|
action: keep
|