BizFirst Observe
Building Custom Dashboards
When the pre-built dashboards don't cover a specific monitoring need, create custom dashboards using Grafana's drag-and-drop editor. This page covers panel types, query editor usage, and template variable setup for multi-tenant dashboards.
Panel Types for BizFirstGO Metrics
| Panel Type | Best For | Data Source |
|---|---|---|
| Time Series | Metric trends over time (latency, throughput, error rate) | Prometheus, Loki metric queries |
| Stat | Single current value with color coding (backlog count, error rate) | Prometheus, Loki |
| Gauge | Percentage or bounded value with fill (SLA compliance, capacity) | Prometheus |
| Bar Chart | Comparing values across categories (error rate by node type) | Prometheus |
| Table | Multi-metric tabular view (tenant health summary) | Prometheus, Loki |
| Logs | Live or historical log streams in a dashboard panel | Loki |
| Traces | Embedded trace waterfall panel | Tempo |
| Heatmap | Distribution over time (node latency histogram) | Prometheus |
| Histogram | Distribution at a point in time | Prometheus |
Creating a Custom Tenant Health Panel
Example: Build a panel showing workflow error rate per tenant as a table with color coding:
1
Add a new panel
Click "Add panel" → "Add a new panel". Select data source: Prometheus.
2
Enter the PromQL query
sum(rate(bizfirst_workflow_executions_total{status="failed"}[5m])) by (tenant_id)
/
sum(rate(bizfirst_workflow_executions_total[5m])) by (tenant_id)
* 100
Add metric legend: {{tenant_id}}
3
Choose Table visualization
Select panel type: Table. Configure columns: Tenant, Error Rate %. Set unit to "Percent (0-100)".
4
Add thresholds
In "Thresholds": Green (0%), Yellow (1%), Red (5%). Grafana will color-code cells based on the error rate value.
Dashboard Template Variables
# Add a $tenant variable to your custom dashboard:
# Dashboard Settings → Variables → New Variable
Name: tenant
Type: Query
Data source: Prometheus
Query: label_values(bizfirst_workflow_executions_total, tenant_id)
Refresh: On time range change
Multi-value: true
Include All option: true
# Use in panel queries:
sum(rate(bizfirst_workflow_executions_total{tenant_id=~"$tenant"}[5m]))
Adding Dashboard Annotations
Mark deployment events on your dashboards to correlate metric changes with deployments:
# Dashboard Settings → Annotations → New Annotation
# Option 1: Manual annotations (click a chart point)
# Enable: "Annotations" toggle → draw mode
# Option 2: Query-based annotations from Loki
Data source: Loki
Query: {job="deployments"} | json | message="deployment_complete"
Min interval: 1m