Skip to content

Grafana Lookups Runbook

Overview

This runbook describes the various Grafana queries that can be used in order to identify errors or troubleshoot things gone wrong.

Synchronisation problems between BNF (Delingstjenesten) and library sites

See all bnf actions on a specific library sites filtered by UUID

If you want to see what happened to a certain piece of conntent you can filter it like this:

{app="cli-persistent", namespace="herning-main"} | json | subtype = `bnf` | message =~ `.*9dfc9d54-7087-41d5-ae11-469aa003c262.*`

Grafana link

Cache Revalidation Monitoring

Track revalidation of specific piece of content on a specific site

If you want to see if a library site sent a revalidation requests to its Go site, you can query like this:

{namespace="ingress-nginx"} | json | path = `/cache/revalidate` | request_query =~ `^tags=node%3A1192.*` | vhost=`www.go.herningbib.dk`

Grafana Link

Note: In the near future it will be possible to follow the UUID as a cache tag as well, when the feature has been merged.

All graphql requests sent to a specific library site

If you want to track all graphql requests sent from Go to a specific library site, you can query like this:

{namespace="ingress-nginx"} | json | path = `/graphql` | http_user_agent = `node` | vhost=`nginx.main.silkeborg.dplplat01.dpl.reload.dk`

Grafana Link

Follow build process of a site being deployed

The Lagoon deployment UI is ok. But if you want to keep track of everything happening in the deployment process you can query like this:

{namespace="dpl-cms-pr-1707", container="lagoon-build"}

Grafana Link

General Query Patterns

Label Selectors

  • {app="...", namespace="..."} - Target specific applications in specific namespaces
  • {namespace="...", container="..."} - Target specific containers within a namespace

Log Processing

  • | json - Parse JSON-formatted log entries
  • | message =~ "pattern" - Filter by message content using regex
  • | path = "/endpoint" - Filter by HTTP path
  • | http_user_agent = "agent" - Filter by user agent
  • | vhost="domain" - Filter by virtual host