-
Notifications
You must be signed in to change notification settings - Fork 0
Add info and dropdowns for Soc and arch #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit adds dropdown to filter by architecture and system on chip. It also adds the information to the device details.
WalkthroughAdded Architecture and SOC as dashboard template filters and integrated them into Flux queries across three Grafana dashboards. Inserted a new "Device Architecture & SoC" stat panel in device_details, adjusted panel grid positions, and bumped dashboard versions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as Dashboard UI
participant Tmpl as Template Engine (Architecture/SOC)
participant Graf as Grafana Panels
participant DB as InfluxDB (Flux)
User->>Tmpl: select Architecture/SOC (templating)
Tmpl-->>Graf: inject filter values into panel queries
Graf->>DB: execute Flux queries (with architecture/soc filters)
DB-->>Graf: return filtered metrics and latest fields (arch, soc)
Graf-->>User: render panels (including new "Device Architecture & SoC" stat)
note right of Graf: Panels' grid positions adjusted to fit new panel
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json(11 hunks)dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json(10 hunks)dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json(9 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
dashboard-deployments/**
⚙️ CodeRabbit configuration file
This directory contains server-side dashboard examples for visualizing data from FixedIT Data Agent running on Axis devices. These are primarily for DevOps/IT professionals comfortable with deploying Grafana dashboards and InfluxDB servers. Some dashboards work directly with bundled agent configurations, others can be customized. Licensed under Elastic License 2.0. Review for deployment complexity, dashboard usability, and proper licensing compliance. We should make sure that dashboards are portable and does not check in specific host names, or refer to other specific data from a single deployment.
Files:
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
**/*
⚙️ CodeRabbit configuration file
This repository serves FixedIT Data Agent users across a spectrum from plug-and-play dashboard deployment to advanced edge device customization. Consider whether changes maintain accessibility for both DevOps professionals (server-side focus) and developers (edge customization focus). If new features are added or existing ones changed significantly, ensure documentation clearly explains the intended audience and usage level. We use prettier for formatting of common file formats like markdown, yaml, json, etc. Example projects should be placed in the repo-root in a directory named project-*/. Whenever referencing Axis device model names like "D4100-VE mk II" or "M3045", prefix it with "AXIS" in capital letters (e.g. "AXIS D4100-VE mk II"). When using Axis as a company name, use "Axis Communications", note that all-caps is only used when "AXIS" is used in their product names, not their company name. When using the name of an Axis product, google on the name to verify that it is correctly identified. Avoid using 'cameras' or 'Axis cameras' unless the solution in related to visual analytics, otherwise prefer using 'Axis devices' to show that the FixedIT Data Agent also works with strobes, speakers, door stations, etc. Images used for the README should be placed in a directory called .images/ in the affected project folder. These images might also be referred to from other sources like the top-level README.md file.
Files:
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
...oyments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
Outdated
Show resolved
Hide resolved
...ts/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json
Show resolved
Hide resolved
...yments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
Show resolved
Hide resolved
|
Todo:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)
253-314: Stat panel may not render two string fields wellThe query outputs two text columns (“Architecture”, “System on Chip”). Stat excels at a single value; with multiple string fields it can show only one or “No value”. Prefer a table panel, or split into two stat panels side‑by‑side.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json(12 hunks)dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json(11 hunks)dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json(16 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
dashboard-deployments/**
⚙️ CodeRabbit configuration file
This directory contains server-side dashboard examples for visualizing data from FixedIT Data Agent running on Axis devices. These are primarily for DevOps/IT professionals comfortable with deploying Grafana dashboards and InfluxDB servers. Some dashboards work directly with bundled agent configurations, others can be customized. Licensed under Elastic License 2.0. Review for deployment complexity, dashboard usability, and proper licensing compliance. We should make sure that dashboards are portable and does not check in specific host names, or refer to other specific data from a single deployment.
Files:
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
**/*
⚙️ CodeRabbit configuration file
This repository serves FixedIT Data Agent users across a spectrum from plug-and-play dashboard deployment to advanced edge device customization. Consider whether changes maintain accessibility for both DevOps professionals (server-side focus) and developers (edge customization focus). If new features are added or existing ones changed significantly, ensure documentation clearly explains the intended audience and usage level. We use prettier for formatting of common file formats like markdown, yaml, json, etc. Example projects should be placed in the repo-root in a directory named project-*/. Whenever referencing Axis device model names like "D4100-VE mk II" or "M3045", prefix it with "AXIS" in capital letters (e.g. "AXIS D4100-VE mk II"). When using Axis as a company name, use "Axis Communications", note that all-caps is only used when "AXIS" is used in their product names, not their company name. When using the name of an Axis product, google on the name to verify that it is correctly identified. Avoid using 'cameras' or 'Axis cameras' unless the solution in related to visual analytics, otherwise prefer using 'Axis devices' to show that the FixedIT Data Agent also works with strobes, speakers, door stations, etc. Images used for the README should be placed in a directory called .images/ in the affected project folder. These images might also be referred to from other sources like the top-level README.md file.
Files:
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
🔇 Additional comments (5)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (3)
183-183: Good propagation of architecture/SoC filters in Last Report panelAll six targets now honor the new selectors with the regex pattern; consistent with the rest of the dashboard.
Also applies to: 192-192, 201-201, 210-210, 219-219, 228-228
328-329: AXIS OS Changes now respects architecture/SoCThe filter block includes both tags; resolves the prior inconsistency for this panel.
1186-1238: Templating for Architecture and SoC looks correctMulti-select, includeAll with ".*", and influx schema.tagValues usage are all aligned with existing variables.
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (2)
74-76: Architecture/SoC filters wired through key panelsQueries now consistently apply architecture and SoC across Device Count (selected), Missing Devices, New Devices, and Outliers. This addresses the noted filter consistency concern.
Also applies to: 228-239, 246-248, 483-485, 492-494, 685-687, 694-696, 703-705, 712-714, 721-723, 730-732
1141-1189: Templating: Architecture and SoC added correctlyVariables are multi-select with includeAll and populated via schema.tagValues; consistent with existing templates.
Manually verify no panels omit the new architecture/soc filters, for example:
rg -n '"query":' dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/*.json \ | rg 'product_full_name' -C3 \ | grep -L 'architecture' \ | grep -L 'soc'
| "query": "// Base query with shared filters\nbase_data = from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) =>\n exists r.type and\n r.type =~ /^${type:regex}$/ and\n r[\"area\"] =~ /^${area:regex}$/ and\n r[\"geography\"] =~ /^${geography:regex}$/ and\n r[\"region\"] =~ /^${region:regex}$/ and\n r[\"site\"] =~ /^${site:regex}$/ and\n r[\"product_full_name\"] =~ /^${model:regex}$/ and\n r[\"${unique_identifier}\"] =~ /^${device:regex}$/ and\n r[\"architecture\"] =~ /^${architecture:regex}$/ and\n r[\"soc\"] =~ /^${soc:regex}$/\n )\n\n// CPU usage per type\ncpu = base_data\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"usage_idle\" and\n r.cpu == \"cpu-total\"\n )\n |> map(fn: (r) => ({ r with _value: 100.0 - r._value }))\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"CPU Usage\" }))\n\n// RAM usage per type\nram = base_data\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"used_percent\"\n )\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"RAM Usage\" }))\n\n// Built-in storage usage per type\ndisk_usr_local = base_data\n |> filter(fn: (r) =>\n r._measurement == \"disk\" and\n r._field == \"used_percent\" and\n r.path == \"/usr/local\"\n )\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"Disk /usr/local\" }))\n\n// SD card storage usage per type\ndisk_sd = base_data\n |> filter(fn: (r) =>\n r._measurement == \"disk\" and\n r._field == \"used_percent\" and\n r.path == \"/var/volatile/spool/storage/SD_DISK\"\n )\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"Disk /SD_DISK\" }))\n\n// Combine all metrics into a single table\nunion(tables: [cpu, ram, disk_usr_local, disk_sd])\n |> group()\n |> pivot(rowKey: [\"type\"], columnKey: [\"metric\"], valueColumn: \"_value\")", | ||
| "refId": "A" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix SD card path to match data agent tags
This panel uses “/var/volatile/spool/storage/SD_DISK”, while other panels use “/var/spool/storage/SD_DISK”. The extra “volatile” likely yields no data here.
Apply:
- r.path == "/var/volatile/spool/storage/SD_DISK"
+ r.path == "/var/spool/storage/SD_DISK"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "query": "// Base query with shared filters\nbase_data = from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) =>\n exists r.type and\n r.type =~ /^${type:regex}$/ and\n r[\"area\"] =~ /^${area:regex}$/ and\n r[\"geography\"] =~ /^${geography:regex}$/ and\n r[\"region\"] =~ /^${region:regex}$/ and\n r[\"site\"] =~ /^${site:regex}$/ and\n r[\"product_full_name\"] =~ /^${model:regex}$/ and\n r[\"${unique_identifier}\"] =~ /^${device:regex}$/ and\n r[\"architecture\"] =~ /^${architecture:regex}$/ and\n r[\"soc\"] =~ /^${soc:regex}$/\n )\n\n// CPU usage per type\ncpu = base_data\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"usage_idle\" and\n r.cpu == \"cpu-total\"\n )\n |> map(fn: (r) => ({ r with _value: 100.0 - r._value }))\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"CPU Usage\" }))\n\n// RAM usage per type\nram = base_data\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"used_percent\"\n )\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"RAM Usage\" }))\n\n// Built-in storage usage per type\ndisk_usr_local = base_data\n |> filter(fn: (r) =>\n r._measurement == \"disk\" and\n r._field == \"used_percent\" and\n r.path == \"/usr/local\"\n )\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"Disk /usr/local\" }))\n\n// SD card storage usage per type\ndisk_sd = base_data\n |> filter(fn: (r) =>\n r._measurement == \"disk\" and\n r._field == \"used_percent\" and\n r.path == \"/var/volatile/spool/storage/SD_DISK\"\n )\n |> group(columns: [\"type\"])\n |> mean()\n |> map(fn: (r) => ({ r with metric: \"Disk /SD_DISK\" }))\n\n// Combine all metrics into a single table\nunion(tables: [cpu, ram, disk_usr_local, disk_sd])\n |> group()\n |> pivot(rowKey: [\"type\"], columnKey: [\"metric\"], valueColumn: \"_value\")", | |
| "refId": "A" | |
| // SD card storage usage per type | |
| disk_sd = base_data | |
| |> filter(fn: (r) => | |
| r._measurement == "disk" and | |
| r._field == "used_percent" and | |
| r.path == "/var/spool/storage/SD_DISK" | |
| ) | |
| |> group(columns: ["type"]) | |
| |> mean() | |
| |> map(fn: (r) => ({ r with metric: "Disk /SD_DISK" })) |
🤖 Prompt for AI Agents
In
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
around lines 846-847, the SD card disk filter uses the path
"/var/volatile/spool/storage/SD_DISK" which doesn't match the agent tags used
elsewhere; update the filter path to "/var/spool/storage/SD_DISK" so it matches
other panels and returns data (leave metric name and grouping unchanged).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but unrelated. The way the file system is set up, both will work. Will fix in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daniel-falk, understood! Thank you for confirming and for planning to address it in a follow-up PR. Since you've noted it's unrelated to the architecture/SoC filter additions in this PR, that makes sense to handle separately.
If you haven't already, you might want to open an issue to track the path normalization across all dashboard panels to ensure it doesn't get lost. Let me know if you'd like me to create one for you.



This commit adds dropdown to filter by architecture and system on chip. It also adds the information to the device details.
Summary by CodeRabbit
New Features
Refactor
Chores