0ba38bc8f7
One dashboard for all six gateways, with a selector accepting one, several or all of them. The selector has to bridge a mismatch: metrics carry the full gateway name (catalog-dev) while audit logs carry the short domain (catalog), because the former comes from the scrape job's label and the latter from the URI path each gateway posts its http-log to. The variable holds the short form, PromQL re-adds the -dev suffix and LogQL uses it as-is, so a single control drives both signals. The capture group in the variable's regex also excludes the unrelated `kong` gateway, which has no -dev suffix. Latency is split three ways rather than shown as one number: total request latency, time spent inside Kong, and upstream latency. The gap between the first and the last is what the gateway itself costs, which is the question worth asking of a proxy. Status classes come from label_replace on the `code` label for metrics and from LogQL's json parser for the audit records, since those carry no severity of their own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
# Grafana dashboards -- declarative provisioning.
|
|
#
|
|
# Rules:
|
|
# * one .json file per dashboard, named after its UID;
|
|
# * every JSON carries a STABLE "uid" field (never regenerated): that is what
|
|
# keeps URLs, cross-links and alerts alive across redeployments;
|
|
# * `disableNameSuffixHash: true` -> the ConfigMap always keeps the same name,
|
|
# so `kubectl apply` updates it in place and Grafana reloads WITHOUT
|
|
# restarting the pod, in about 70s (see dashboard-providers.yaml).
|
|
#
|
|
# Adding a dashboard = drop the .json here and add it to `files:` below.
|
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
namespace: observability
|
|
|
|
configMapGenerator:
|
|
- name: grafana-dashboards
|
|
files:
|
|
# >>> dashboards (generated by `make dashboards-sync`) >>>
|
|
- obs-classic-models-api.json
|
|
- obs-keycloak.json
|
|
- obs-kong-gateways.json
|
|
- obs-librechat.json
|
|
- obs-stack-health.json
|
|
# <<< dashboards <<<
|
|
|
|
generatorOptions:
|
|
disableNameSuffixHash: true
|
|
labels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/component: dashboards
|
|
app.kubernetes.io/part-of: observability
|