📚 Module Overview
Build three production-grade dashboards that integrate all three data sources for comprehensive monitoring.
🌐 Dashboard 1: Network Health (LibreNMS Focus)
1
Create Dashboard Variables
Dashboard Settings → Variables → Add variable
Name: device
Type: Query
Data source: LibreNMS
Query: SELECT DISTINCT hostname FROM devices WHERE disabled = 0
Multi-value: Yes
Include All: Yes
2
Add Panel: Interface Traffic
SELECT
UNIX_TIMESTAMP(datetime) as time_sec,
ifInOctets_rate * 8 / 1000000 as "Inbound",
ifOutOctets_rate * 8 / 1000000 as "Outbound"
FROM ports
INNER JOIN devices ON ports.device_id = devices.device_id
WHERE devices.hostname = '$device'
AND $__timeFilter(datetime)
ORDER BY datetime
💻 Dashboard 2: System Performance (Telegraf Focus)
3
Add Panel: CPU & Memory
# CPU Usage
SELECT mean("usage_system") + mean("usage_user") as "CPU"
FROM "cpu"
WHERE ("host" =~ /^$host$/ AND "cpu" = 'cpu-total')
AND $timeFilter
GROUP BY time($__interval), "host"
# Memory Usage
SELECT mean("used_percent") as "Memory"
FROM "mem"
WHERE ("host" =~ /^$host$/)
AND $timeFilter
GROUP BY time($__interval), "host"
🔗 Dashboard 3: Correlation Dashboard (All Sources)
4
Multi-Source Error Correlation Panel
Create a panel with queries from all three sources:
# Query A - Network Errors (LibreNMS)
SELECT
UNIX_TIMESTAMP(datetime) as time_sec,
SUM(ifInErrors_rate + ifOutErrors_rate) as "Network Errors"
FROM ports
WHERE $__timeFilter(datetime)
GROUP BY datetime
# Query B - System Load (Telegraf)
SELECT mean("load1") as "System Load"
FROM "system"
WHERE $timeFilter
GROUP BY time($__interval)
# Query C - Log Errors (VictoriaLogs)
sum(rate({level="error"}[1m]))
💡 Dashboard Best Practices
Variables: Use consistent naming (hostname/host) across sources
Time Sync: All panels share the dashboard time range
Refresh: Set to 30s-1m for production dashboards
Organization: Group related panels in rows