Observability

How to use Grafana, VictoriaMetrics, and VictoriaLogs on the SDP: query dashboards, metrics, and logs, expose your own metrics, and set up alerts.

The ayedo Software Delivery Platform (SDP) ships with a ready-to-use observability stack: VictoriaMetrics stores metrics, VictoriaLogs stores logs, and Grafana is where you explore both and set up alerts. The platform runs, scales, and updates the stack; you provide your applications' logs and metrics and build dashboards and alerts on top.

Accessing Grafana

Open your instance's Grafana URL (for example https://grafana.example.com) and sign in with single sign-on. Your Grafana role (Viewer, Editor, or Admin) is derived from your identity provider groups; see Access & Identity.

The VictoriaMetrics and VictoriaLogs data sources are preconfigured and available in dashboards and under Explore. You can create your own dashboards and folders within your organization.

Metrics with VictoriaMetrics

Cluster, pod, and application metrics are stored in VictoriaMetrics. Built-in dashboards cover cluster, namespace, and pod utilization. For your own queries, use Explore with MetricsQL, which is PromQL-compatible:

# CPU usage per pod (5-minute rate)
sum by (pod) (rate(container_cpu_usage_seconds_total{namespace="acme-production", container!=""}[5m]))

# Memory (working set) per pod
sum by (pod) (container_memory_working_set_bytes{namespace="acme-production", container!=""})

# Container restarts in the last 15 minutes
sum by (pod) (increase(kube_pod_container_status_restarts_total{namespace="acme-production"}[15m])) > 0

Your Own Application Metrics

Expose your application's metrics on a /metrics endpoint in Prometheus format and create a ServiceMonitor for it (VMServiceScrape works too). The platform then scrapes the metrics automatically. If you deploy with ohMyHelm, you can generate the ServiceMonitor straight from your chart values; see the ServiceMonitor helper.

Logs with VictoriaLogs

Automatic Collection

You don't need your own log agent or sidecar for container logs. Everything your containers write to stdout and stderr is picked up by the platform collector (Vector) and stored in VictoriaLogs together with Kubernetes metadata:

Field Content
kubernetes.pod_namespace Pod namespace
kubernetes.pod_name Pod name
kubernetes.container_name Container name

To keep logs easy to search, write directly to stdout/stderr rather than to files inside the container, and log structured JSON with consistent fields such as level, msg, service, and trace_id. Wrap multi-line stack traces in JSON; otherwise every line is stored as a separate entry. Passwords, tokens, and unnecessary personal data don't belong in logs.

Querying Logs (LogsQL)

In Explore, select the VictoriaLogs data source and filter with LogsQL:

# Errors in a namespace
kubernetes.pod_namespace:"acme-production" AND ("error" OR "ERROR")

# Logs from specific pods
kubernetes.pod_namespace:"acme-production" AND kubernetes.pod_name:~"my-app-.*"

# Count errors per pod
kubernetes.pod_namespace:"acme-production" AND level:"error" | stats by (kubernetes.pod_name) count() as errors

Additional Log Sources in Self-Operated Environments

If you run the platform yourself with Polycrate, the ayedo/k8s/victoria-logs block deploys VictoriaLogs. Besides container logs, it can ingest further sources:

  • Other clusters: In agent mode, a cluster stores no logs locally and ships them via vlagent.remotewrite to a central VictoriaLogs instance. Keep credentials for the target URL in workspace encryption, not in plain text.
  • Syslog: With vlsingle.syslog.enabled: true (or vlinsert.syslog in cluster mode), VictoriaLogs accepts syslog on UDP port 514, optionally on a dedicated load balancer IP (syslog.loadbalancer). Appliances and rsyslog hosts then forward to it, e.g. with *.* @10.0.0.28:514. UDP syslog is unencrypted, so use it only on isolated internal networks.
  • Linux hosts: The ayedo/linux/hardening block can install Vector on VMs and bare-metal hosts and ship journald, auditd, and Docker logs to VictoriaLogs over HTTPS. Under collectors.vector.logs, set the endpoint and use the VictoriaLogs ingest path /insert/elasticsearch as path.

Run polycrate hub inspect ayedo/k8s/victoria-logs to see all configuration options.

Alerting in Grafana

You set up alerts for your applications in Grafana under Alerting. A rule can evaluate metrics from VictoriaMetrics or log patterns from VictoriaLogs. Infrastructure, nodes, and platform components are monitored by platform operations, so you don't need to cover them.

Contact Points

A contact point defines where notifications go. Create one under Alerting → Contact points → Add contact point, for example for Slack, Microsoft Teams, email, PagerDuty, Opsgenie, or any webhook. Use Test to check delivery before saving.

Alert Rules

Under Alerting → Alert rules → New alert rule, create a Grafana-managed rule:

  1. Give it a descriptive name and save it in your team's folder.
  2. Choose the data source and write the query.
  3. Define the condition with Reduce (e.g. Last) and Threshold.
  4. Set the evaluation interval (e.g. 1m) and a pending period (e.g. 5m) so that short spikes during a rollout don't fire.
  5. Add labels such as severity and team for routing, plus a summary and description that name the affected service, its state, and the runbook.

Proven queries for application alerts:

# Repeated restarts (CrashLoop)
sum by (namespace, pod) (increase(kube_pod_container_status_restarts_total{namespace="acme-production"}[15m])) > 2

# HTTP 5xx ratio above 5 %
sum(rate(http_requests_total{namespace="acme-production", status=~"5.."}[5m]))
/ sum(rate(http_requests_total{namespace="acme-production"}[5m])) > 0.05

# Memory above 85 % of the limit
sum by (pod) (container_memory_working_set_bytes{namespace="acme-production", container!=""})
/ sum by (pod) (kube_pod_container_resource_limits{namespace="acme-production", resource="memory"}) > 0.85

For log-based alerts, count matches with LogsQL, such as kubernetes.pod_namespace:"acme-production" AND level:"error" | stats count() as error_count, and set a threshold like error_count > 20 within 5 minutes.

Alert primarily on symptoms your users notice (error rate, latency, pods not ready), and reserve severity=critical for acute impact. Decide per rule how missing data is treated, for example for infrequent CronJobs.

Notification Policies

Under Alerting → Notification policies you decide which alert goes to which contact point. The default policy sets the default contact point and grouping (e.g. by alertname and namespace). Nested policies route by label, for instance team=acme-backend with severity=critical to the on-call channel and severity=warning to a team channel. Group wait, Group interval, and Repeat interval control how quickly alerts are bundled and how often an ongoing alert is re-sent.

Silences

Before planned releases, migrations, or maintenance, mute notifications for a limited time under Alerting → Silences → Add silence. Keep the label matchers as narrow as possible (a single namespace or alert name, for example) and add a comment with the reason so other alerts keep flowing.

Running Your Own Observability Components

You can run additional tools in your namespaces, such as an OpenTelemetry Collector. Limit such collectors to your own namespaces and workloads. Exporting to external SaaS backends requires permitted outbound traffic; see Networking & Ingress. Coordinate any additional cluster-wide scrape stack with platform operations in advance to avoid duplicate load.

Who Does What

Platform operations Your team
Running VictoriaMetrics, VictoriaLogs, and Grafana Structured logs on stdout/stderr and metrics on /metrics
Default dashboards and log collection Your own dashboards, application alerts, and runbooks
Monitoring infrastructure and the platform Responding to alerts for your applications

Retention periods and the managed service scope are defined in the service annex to our terms.

Further Reading