Dashboards
Grafana dashboards are pre-configured for monitoring Laminar pipelines and infrastructure.
Datasources
Grafana has three pre-configured datasources:
| Name | Type | Endpoint | Purpose |
|---|---|---|---|
| Laminar-Metrics | Prometheus | laminar-engine:8004 | Laminar engine metrics |
| GrepTimeDB-Metrics | Prometheus | greptimedb:4000/v1/prometheus | Container/node/K8s metrics |
| GrepTimeDB-Logs | MySQL | greptimedb:4002 | Log queries |
Dashboard Provisioning
Dashboards are provisioned from ConfigMaps with the label grafana_dashboard: "1".
The Grafana sidecar watches all namespaces for ConfigMaps with this label and automatically loads them.
Adding Custom Dashboards
apiVersion: v1
kind: ConfigMap
metadata:
name: my-custom-dashboard
namespace: laminar-monitoring
labels:
grafana_dashboard: "1"
annotations:
grafana_folder: "Custom"
data:
my-dashboard.json: |
{
"title": "My Dashboard",
"panels": [...]
}Built-in Dashboards
Dashboards are provisioned from the laminar-dashboards ConfigMap in the "Laminar" folder.
Laminar Logs
UID: laminar-logs
Datasource: GrepTimeDB-Logs (MySQL)
Displays application logs from GrepTimeDB.
| Panel | Type | Query |
|---|---|---|
| Errors (1h) | Stat | SELECT COUNT(*) FROM logs WHERE level = 'error' AND greptime_timestamp > NOW() - INTERVAL 1 HOUR |
| Warnings (1h) | Stat | SELECT COUNT(*) FROM logs WHERE level = 'warn' AND greptime_timestamp > NOW() - INTERVAL 1 HOUR |
| Total Logs (1h) | Stat | SELECT COUNT(*) FROM logs WHERE greptime_timestamp > NOW() - INTERVAL 1 HOUR |
| Recent Logs | Table | Last 100 logs with timestamp, level, target, message |
| Error Logs (24h) | Table | Last 50 ERROR level logs with fields |
Laminar Metrics
UID: laminar-metrics
Datasource: GrepTimeDB-Metrics (Prometheus)
Displays Laminar engine metrics.
| Panel | Type | Query |
|---|---|---|
| Active Pipelines | Time Series | laminar_controller_active_pipelines |
| Slot Utilization | Time Series | laminar_controller_registered_slots and laminar_controller_free_slots |
| Registered Nodes | Stat | laminar_controller_registered_nodes |
| Total Slots | Stat | laminar_controller_registered_slots |
| Free Slots | Stat | laminar_controller_free_slots |
| Active Pipelines | Stat | laminar_controller_active_pipelines |
| Worker Bytes | Time Series | sum(laminar_worker_bytes_recv) by (operator_name) |
| Worker Messages | Time Series | sum(laminar_worker_messages_recv) by (operator_name) |
Kubernetes Cluster Overview
UID: k8s-cluster-overview
Datasource: GrepTimeDB-Metrics (Prometheus)
High-level view of the Kubernetes cluster.
| Panel | Type | Query |
|---|---|---|
| Total Nodes | Stat | count(kube_node_info) |
| Running Pods | Stat | sum(kube_pod_status_phase{phase="Running"}) |
| Pending Pods | Stat | sum(kube_pod_status_phase{phase="Pending"}) |
| Failed Pods | Stat | sum(kube_pod_status_phase{phase="Failed"}) |
| Cluster CPU Usage | Time Series | 1 - avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) |
| Cluster Memory Usage | Time Series | sum(node_memory_total_bytes) - sum(node_memory_available_bytes) |
| Pods by Phase | Time Series | sum by (phase) (kube_pod_status_phase) |
| Pod Restarts (1h) | Table | Top 10 pods by restart count |
Kubernetes Node Resources
UID: k8s-node-resources
Datasource: GrepTimeDB-Metrics (Prometheus)
Variables: $node (multi-select, default: All)
Detailed resource metrics per node.
| Panel | Type | Query |
|---|---|---|
| Node CPU Usage | Time Series | 1 - avg by(node) (rate(node_cpu_seconds_total{mode="idle"}[5m])) |
| Node Memory Usage | Time Series | 1 - (node_memory_available_bytes / node_memory_total_bytes) |
| Node Disk Usage (/) | Time Series | 1 - (node_filesystem_free_bytes / node_filesystem_total_bytes) |
| Node Network I/O | Time Series | rate(node_network_receive_bytes_total[5m]) |
| Node Load Average | Time Series | node_load1, node_load5, node_load15 |
| CPU Requests / Allocatable | Time Series | CPU requests vs allocatable ratio |
| Memory Requests / Allocatable | Time Series | Memory requests vs allocatable ratio |
| Node Resource Requests vs Allocatable | Table | Summary table with CPU/Memory requests, allocatable, available, and percentages |
Kubernetes Pod Resources
UID: k8s-pod-resources
Datasource: GrepTimeDB-Metrics (Prometheus)
Variables: $namespace, $pod (multi-select, default: All)
Per-pod resource metrics.
| Panel | Type | Query |
|---|---|---|
| Pod CPU Usage vs Requests | Time Series | sum by(pod) (rate(container_cpu_usage_seconds_total[5m])) |
| Pod Memory Usage vs Limits | Time Series | sum by(pod) (container_memory_working_set_bytes) |
| Container Restarts (1h) | Time Series | sum by(pod, container) (increase(kube_pod_container_status_restarts_total[1h])) |
| Pod Status | Table | Current pod phase by namespace and pod |
| Pod Network I/O | Time Series | rate(container_network_receive_bytes_total[5m]) |
Access
Desktop Mode
Grafana is available at: http://localhost:3001
Credentials: laminar / laminar
Kubernetes
Grafana is available at: https://grafana.{baseDomain}
Credentials: laminar / laminar
Creating Custom Dashboards
Using Grafana UI
- Navigate to Grafana → Dashboards → New Dashboard
- Add panels using the available datasources
- Save and export as JSON
Using ConfigMaps (Kubernetes)
- Export dashboard JSON from Grafana
- Create a ConfigMap with the
grafana_dashboard: "1"label - Apply to the cluster
kubectl create configmap my-dashboard \
--from-file=dashboard.json \
-n laminar-monitoring
kubectl label configmap my-dashboard grafana_dashboard=1 \
-n laminar-monitoring