{% extends "base.html" %} {% load i18n %} {% block title %}{% trans "Prometheus Metrics" %}{% endblock %} {% block contents %}

{% trans "Prometheus Metrics Dashboard" %}

{% trans "Kiwi TCMS metrics endpoint for Prometheus scraping." %}

{% trans "Metrics Endpoint" %}

{% trans "URL" %}
{{ metrics_url }}
{% trans "Token Protection" %}
{% if token_protected %} {% trans "Enabled" %} {% trans "Set via PROMETHEUS_METRICS_TOKEN env var" %} {% else %} {% trans "Disabled" %} {% trans "Set PROMETHEUS_METRICS_TOKEN env var to enable" %} {% endif %}

{% trans "Prometheus Scrape Configuration" %}

scrape_configs:
  - job_name: 'kiwi-tcms'
    {% if token_protected %}params:
      token: ['<your-token>']
    {% endif %}metrics_path: '/tcms_prometheus_exporter/metrics/'
    static_configs:
      - targets: ['your-kiwi-host:8000']

{% trans "Current Metric Values" %}

{{ metrics_output }}
{% endblock %}