Skip to content

Conversation

@daniel-falk
Copy link
Contributor

@daniel-falk daniel-falk commented Aug 3, 2025

This PR adds the most current version of the system monitoring dashboards for the FixedIT Data Agent. It also adds a license to use for the dashboard examples and some general repo structure to enable future additions. The repo is structured to allow example projects for the FixedIT Data Agent edge application in the root folder, and different dashboard examples in the dashboard-deployments directory. All dashboards are intended to use the Elastic 2.0 license while the other open projects might use different licenses (most probably MIT license).

Summary by CodeRabbit

  • New Features

    • Introduced ready-to-use Docker Compose stacks for system monitoring with InfluxDB and Grafana, including production and development configurations.
    • Added automated scripts for secure environment setup and Docker installation on AWS EC2.
    • Provided pre-configured Grafana dashboards for device monitoring, system overview, and device details.
    • Included Grafana provisioning for datasources and dashboards.
  • Documentation

    • Added comprehensive README files detailing repository structure, deployment instructions, and usage examples.
    • Included licensing information and guidelines for all components and subdirectories.

@coderabbitai
Copy link

coderabbitai bot commented Aug 3, 2025

Walkthrough

This update introduces comprehensive documentation, licensing, configuration, and example deployment resources for FixedIT Data Agent dashboards. It adds new LICENSE files, rewrites the main README, and provides a full-featured example stack for monitoring Axis devices using InfluxDB and Grafana, including Docker Compose files, provisioning, dashboards, and helper scripts for deployment and environment setup.

Changes

Cohort / File(s) Change Summary
Top-level Licensing & Documentation
LICENSE, README.md
Added a multi-component LICENSE file and replaced the main README with a broader overview of FixedIT Data Agent resources and upcoming content.
Dashboard Deployments Licensing & Overview
dashboard-deployments/LICENSE, dashboard-deployments/README.md
Added Elastic License 2.0 for dashboard deployments and a README describing example stacks, licensing, and usage guidance.
System Monitoring Stack Configuration
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml, dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml
Introduced Docker Compose files for development and production, defining InfluxDB and Grafana services, healthchecks, environment overrides, and Ouroboros for automated monitoring and updates.
Stack Documentation
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/README.md
Added detailed documentation for deploying and configuring the monitoring stack, including usage, credentials, and security notes.
Helper Scripts & Documentation
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md, .../helper_scripts/generate-env.sh, .../helper_scripts/install-docker-aws-ec2.sh
Added scripts for secure environment variable generation and Docker installation on AWS EC2, with README instructions and deployment guidelines.
Grafana Provisioning & Dashboards
.../provisioning/dashboards/camera_dashboards.yml, .../provisioning/dashboards/device_details.json, .../provisioning/dashboards/overview_of_devices.json, .../provisioning/dashboards/system_overview.json
Added provisioning config and four comprehensive Grafana dashboards for device/system monitoring, including panels, queries, and templating.
Grafana Datasource Configuration
.../provisioning/datasources/datasource.yaml
Added Grafana datasource YAML for connecting to InfluxDB using environment-based credentials and Flux queries.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HelperScript
    participant DockerCompose
    participant InfluxDB
    participant Grafana
    participant Ouroboros

    User->>HelperScript: Run generate-env.sh
    HelperScript-->>User: Output env.sh with secrets/ports

    User->>DockerCompose: Run docker compose up -d (with env.sh)
    DockerCompose->>InfluxDB: Start InfluxDB with env variables
    DockerCompose->>Grafana: Start Grafana with env variables
    DockerCompose->>Ouroboros: (Production) Start Ouroboros

    Ouroboros->>InfluxDB: Monitor health, auto-update
    Ouroboros->>Grafana: Monitor health, auto-update

    User->>Grafana: Access dashboards via browser
    Grafana->>InfluxDB: Query metrics using Flux
    Grafana-->>User: Display device/system dashboards
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • fixedit-ai/fixedit-agents#299: Adds prototype Grafana dashboard JSON files for system monitoring; related due to overlap in dashboard content and monitoring focus.
  • fixedit-ai/fixedit-agents#439: Adds a generate-env.sh script for generating credentials and ports for dashboard deployments; related at the script and deployment configuration level.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@daniel-falk daniel-falk mentioned this pull request Aug 3, 2025
@daniel-falk
Copy link
Contributor Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Aug 4, 2025

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (12)
README.md (1)

9-9: Typo: “Comming soon…” → “Coming soon…”

Small spelling fix for a polished first impression.

-[Comming soon...]
+[Coming soon...]
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md (1)

7-8: Mention chmod +x for first-time runs

On fresh EC2 instances the script will lack the executable bit. Adding a one-liner prevents a common pitfall:

chmod +x install-docker-aws-ec2.sh && ./install-docker-aws-ec2.sh
dashboard-deployments/README.md (1)

11-16: Cross-reference the differing licenses more explicitly

Lines 11-16 introduce Elastic 2.0 but the root of the repo advertises MIT for “other projects”. A short sentence linking back to the root LICENSE (or vice-versa) will help downstream users understand which parts are under which terms.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/README.md (2)

14-17: Highlight that default credentials are development-only

It’s worth adding a one-sentence warning that test/testtest and admin/test must never be used beyond local environments, pointing readers to the env.sh/production compose workflow.


22-30: Recommend --env-file over source for portability

Sourcing env.sh relies on users’ current shell and pollutes their session. docker compose --env-file env.sh … is less error-prone and works in CI.

-source env.sh
-docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
+docker compose --env-file env.sh \
+  -f docker-compose.yml -f docker-compose.prod.yml up -d
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml (1)

27-37: Consider Docker secrets for sensitive credentials

Admin passwords and tokens are injected via environment variables, which are world-readable through docker inspect. Switching to Compose secrets: keeps them off disk and out of container metadata.

dashboard-deployments/LICENSE (1)

5-8: Minor style nit – add heading markers

The first four sections (Acceptance, Copyright License, …) render as plain text.
Adding Markdown headings (## Acceptance, …) improves readability in GitHub UI without altering the legal text.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/generate-env.sh (1)

75-81: Avoid printing secrets in clear text

The final echo block dumps all generated passwords/tokens to stdout.
This is convenient for local runs but risky in CI logs or screen-sharing sessions.

Consider gating it behind a --verbose / --show-secrets flag or omitting secret values entirely.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml (1)

7-10: Anchor x-common-vars is defined but never reused

The anchor is a great idea for DRY variables but it’s currently unused, which may confuse contributors.

Either reference it (e.g. environment: *common-vars) or remove it entirely.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (3)

517-519: Repeating rows per-device can overload the browser

"repeat": "device" at Line 516 renders one full row (six panels) for every selected device. With wide multi-selects (the default $__all) this can easily produce hundreds of panels, crippling Grafana’s front-end.

Add a note in the README and/or in a dashboard description recommending users to:
• restrict the Device variable to a small subset before loading the dashboard, or
• set a hard maxDataPoints / use collapsed rows by default.

Also consider adding "maxPerRow" limits or enabling “repeat direction = vertical” to mitigate layout thrashing.


621-642: Inconsistent CPU metric: idle→load inversion here differs from row gauges

The trend table builds CPU usage from usage_idle (100 – idle).
The per-device bar gauge (Line 686) directly queries usage_active.

Mixing the two may confuse users when they compare numbers across panels. Either use the same field in both places or document the difference explicitly in panel descriptions.


958-972: Hidden data-source & bucket variables need documentation

Both datasource and bucket variables are hidden ("hide": 2). A newcomer importing the JSON manually will not see them and may wonder why queries fail.

At minimum, add a short comment to the project README explaining:

  1. The dashboard expects a data-source named InfluxDB (or update the variable default).
  2. The Grafana provisioning in this repo auto-creates the hidden variables.

This avoids friction for users who import the dashboard outside the provided Docker-Compose stack.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 1942a94 and 3ba436a.

📒 Files selected for processing (15)
  • LICENSE (1 hunks)
  • README.md (1 hunks)
  • dashboard-deployments/LICENSE (1 hunks)
  • dashboard-deployments/README.md (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/README.md (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/generate-env.sh (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/install-docker-aws-ec2.sh (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/camera_dashboards.yml (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/datasources/datasource.yaml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit Configuration File

**/*: If a file changes something that might be considered an API (external web server, reading or writing to persisting files, etc), remind the author to make sure we do not break any compatibility.

If a new feature is added or an existing is changed in a major way, remind the author to update the instructions in the README and add it to the change log if needed.

If there are not enough describing docstrings, kindly ask the author to add it.

Files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/install-docker-aws-ec2.sh
  • README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/generate-env.sh
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/datasources/datasource.yaml
  • dashboard-deployments/LICENSE
  • dashboard-deployments/README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml
  • LICENSE
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/camera_dashboards.yml
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
🔇 Additional comments (10)
LICENSE (1)

1-18: Clarify the root-level license for repository code

The file instructs consumers to “check subdirectories”, but it never states the license that applies to files at the repository root (e.g. helper scripts, README).
Please either

  1. add the explicit license text (MIT was mentioned in the PR description), or
  2. insert a short statement declaring that all files not covered by a nested LICENSE inherit .

This prevents ambiguity for downstream users and package managers.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/camera_dashboards.yml (1)

4-8: Confirm whether dashboards should be protected from deletion

disableDeletion: false allows users to delete the provisioned dashboards from the Grafana UI.
If these dashboards are meant to be canonical examples, consider flipping this to true to prevent accidental loss, or document the intended behaviour in the stack README.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/datasources/datasource.yaml (1)

7-15: Ensure required env-vars are injected into the Grafana container

The datasource relies on ${INFLUXDB_ORG}, ${INFLUXDB_BUCKET}, and ${INFLUXDB_TOKEN} being present in the Grafana process environment.
Double-check that the Docker Compose (and docker-compose.prod.yml) sets these variables for the grafana service; otherwise the datasource will be created with literal placeholders and queries will fail.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md (1)

35-40: Clarify volume naming to avoid cross-deployment clashes

The guideline recommends copying the whole directory per deployment. Because Docker volume names are global on a host, identical docker-compose.yml files will create volumes that collide unless they are explicitly prefixed or declared as local with a unique name.

Consider parameterising the volume names via the same env.sh or renaming them to include the deployment folder.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml (2)

32-37: Health-check port is hard-coded

If INFLUXDB_PORT is changed via env.sh, the container will still probe 8086 and report unhealthy. Recommend templating the port:

test: ["CMD", "curl", "-f", "http://localhost:${INFLUXDB_PORT:-8086}/health"]

42-45: Verify token variable consistency

Grafana receives INFLUXDB_TOKEN=${INFLUXDB_ADMIN_TOKEN} whereas the helper script description only mentions INFLUXDB_ADMIN_TOKEN. Double-check that generate-env.sh exports both names or that provisioning files reference the correct one.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml (1)

32-35: Running Grafana as root should be temporary

The comment explains the workaround, but leaving user: "0" in example code often propagates to real deployments. Consider:

  1. Documenting the proper chown fix in README.
  2. Adding a TODO to drop root once volume permissions are corrected.
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)

830-837: Device-detail dashboard UID is hard-coded elsewhere

"uid": "bekds38txl1j4c" is referenced by other dashboards for cross-links.
If this file is ever imported into a different Grafana instance the UID will be regenerated, breaking links.

Mitigate by:

  • Converting cross-dashboard links to use ${device_details_uid} variable exclusively, or
  • Documenting that the JSON must be imported with “preserve UID” enabled.
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1)

188-190: Broken link risk: hard dependency on device_details_uid

Links like
"/d/${device_details_uid:raw}/device-details?var-device=${__value.text}"
assume the constant variable device_details_uid matches the actual UID of the Device Details dashboard.

If the UID changes, navigation will silently fail. Consider resolving the UID dynamically (Grafana doesn’t expose this yet) or adding a validation check in provisioning scripts / README.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1)

951-954: Reminder: keep the 15 min refresh aligned with Influx retention

The global "refresh": "15m" is fine, but if the InfluxDB retention bucket is configured at 5 m or less (common for edge devices) this wastes queries. Ensure the README calls out the expected retention & down-sampling policy.

@daniel-falk
Copy link
Contributor Author

@fixedit-olatz Also added this:

Fix deployment of multiple stacks and remove Ourobous

1) When manually setting the container names, we could not deploy multiple
instances to the same host. This commit creates a suffix that is used
on the names to allow multiple deployments.

2) Ourobous did not work as expected when running multiple instances on
   the same host. When one Ouroborus container was stopped, the other
   also stopped. This commit removes it since we have not tested
   it enough and validated that it actually provides value.

Daniel Falk added 4 commits August 5, 2025 15:54
This commit adds the current version of the system monitoring dashboards
for the FixedIT Data Agent. It also adds a license to use for the
dashboard examples and some general repo structure to enable future
additions.
This commit does not change the logic, but makes the implementation a
bit clearer and avoids race conditions.
1) When manually setting the container names, we could not deploy multiple
instances to the same host. This commit creates a suffix that is used
on the names to allow multiple deployments.

2) Ourobous did not work as expected when running multiple instances on
   the same host. When one Ouroborus container was stopped, the other
   also stopped. This commit removes it since we have not tested
   it enough and validated that it actually provides value.
@daniel-falk daniel-falk force-pushed the feature/add-monitoring-dashboard branch from 5f06153 to af542ab Compare August 5, 2025 13:54
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 3ba436a and af542ab.

📒 Files selected for processing (15)
  • LICENSE (1 hunks)
  • README.md (1 hunks)
  • dashboard-deployments/LICENSE (1 hunks)
  • dashboard-deployments/README.md (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/README.md (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/generate-env.sh (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/install-docker-aws-ec2.sh (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/camera_dashboards.yml (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/datasources/datasource.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (5)
  • dashboard-deployments/README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/install-docker-aws-ec2.sh
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/README.md
  • dashboard-deployments/LICENSE
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (9)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/camera_dashboards.yml
  • LICENSE
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.prod.yml
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json
  • README.md
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/datasources/datasource.yaml
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/helper_scripts/generate-env.sh
🧰 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.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.

Files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
🧠 Learnings (7)
📓 Common learnings
Learnt from: daniel-falk
PR: fixedit-ai/client-doordash#290
File: acaps/installer_agent/app/manifest.base.jsonnet:21-21
Timestamp: 2025-05-09T09:00:38.747Z
Learning: In this project, changelog entries in *_SPEC.md files are historical records and should remain unchanged. New version entries are added above previous ones, rather than replacing them. Each application (Installer Agent, Config Agent, Telegraf Agent) has its own independent version numbering.
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-data-agent-examples#2
File: dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml:18-23
Timestamp: 2025-08-04T11:56:34.760Z
Learning: In dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml, hard-coded test credentials (test/testtest) and admin token are intentionally used to make it as easy as possible for new people to quickly test the stack. The production setup with docker-compose.prod.yml uses secure environment variables instead.
Learnt from: daniel-falk
PR: fixedit-ai/client-doordash#268
File: acaps/telegraf_agent/frontend/README.md:2-3
Timestamp: 2025-05-15T13:40:02.484Z
Learning: In the fixedit-ai/client-doordash repository, detailed documentation should be maintained in per-application README files rather than in the main README.md file.
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-agents#360
File: TELEGRAF_AGENT_CONFIG_SPEC.md:82-88
Timestamp: 2025-07-03T07:47:11.566Z
Learning: In the fixedit-ai/fixedit-agents Telegraf Agent documentation, the term "real-time" is a crucial technical distinction when describing logging capabilities. The Web UI version provides real-time log viewing, while the system log writes in batch mode at predetermined intervals. This distinction is important for users to understand the different capabilities between application versions and should not be removed as redundant wording.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#17
File: cloud_infra/README.md:1-35
Timestamp: 2025-07-01T11:34:26.699Z
Learning: User daniel-falk prefers using `prettier -w *.md` for markdown formatting instead of manual markdown fixes, and plans to integrate automated formatting into CI/CD pipelines systematically.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#4
File: vscode_plugins/acap-documentation-viewer/src/utils/utils.ts:1-1
Timestamp: 2025-06-16T15:00:52.939Z
Learning: User daniel-falk prefers using established, well-tested JavaScript libraries over custom implementations for standard functionality like string sanitization, URL validation, and template inflation, especially for security-critical operations.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#17
File: cloud_infra/lambdas/fixedit-developer-friend-devcloud-dependency-cache/index.py:61-62
Timestamp: 2025-07-01T11:33:53.832Z
Learning: User daniel-falk prefers using automated formatting tools like `black` for Python code formatting instead of manual PEP 8 fixes, and plans to integrate these tools into CI/CD pipelines. They also recommend `autopep8` for finding additional issues like incorrect names.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#17
File: cloud_infra/lambdas/fixedit-developer-friend-devcloud-dependency-cache/index.py:67-67
Timestamp: 2025-07-27T10:49:53.485Z
Learning: User daniel-falk prefers explicit type annotations with proper dependencies over fallback mechanisms that silently disable type checking. He believes that if proper type hints are used, the required libraries should be added as dependencies rather than falling back to Any, which defeats the purpose of type checking.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#17
File: cloud_infra/README.md:0-0
Timestamp: 2025-07-27T10:43:21.696Z
Learning: User daniel-falk prefers conservative documentation that only claims compatibility with Python versions that are actually tested, rather than making broad compatibility claims like "Python 3.8+" without verification. He believes it's better to document the specific version being used and tested rather than potentially fragile compatibility statements.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#17
File: cloud_infra/cloud_formation/web-service.yaml:67-67
Timestamp: 2025-07-28T10:11:12.253Z
Learning: User daniel-falk prefers managing sensitive configuration like API tokens through environment variables that are validated at deployment time, with clear error messages when required variables are missing. For CI/CD scenarios, these should be configured as repository secrets rather than hardcoded values.
Learnt from: daniel-falk
PR: fixedit-ai/FixedIT-Developer-Friend#4
File: vscode_plugins/acap-documentation-viewer/src/controller/ResultWebview.ts:0-0
Timestamp: 2025-07-11T10:09:50.781Z
Learning: User daniel-falk prefers detailed, verbose comments that explain the "why" behind code decisions, not just the "what". Comments should provide extra context and be written for readers' understanding, even if they're longer. This applies especially to security-related code where explaining the reasoning (like CSP nonce generation for XSS prevention) adds valuable context.
📚 Learning: grafana 12 can autogenerate dashboard json configurations that mix rawquery: false with flux queries...
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-agents#291
File: prototypes/dashboards/dashboard-json-files/config_agent.json:188-206
Timestamp: 2025-06-26T07:25:06.124Z
Learning: Grafana 12 can autogenerate dashboard JSON configurations that mix rawQuery: false with Flux queries alongside legacy InfluxQL keys (groupBy, select, tags) without causing query mode mismatch errors. These configurations import and work fine in Grafana 12.

Applied to files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
📚 Learning: in prototypes/dashboards/dashboard-json-files/, the grafana dashboard json files are automatically g...
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-agents#385
File: prototypes/dashboards/dashboard-json-files/config_agent.json:607-644
Timestamp: 2025-07-04T12:18:25.332Z
Learning: In prototypes/dashboards/dashboard-json-files/, the Grafana dashboard JSON files are automatically generated by Grafana. Manual optimizations or code style suggestions should not be applied to these files since changes would be overwritten when dashboards are updated through the Grafana UI.

Applied to files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
📚 Learning: in provisioned grafana dashboards where uids are hardcoded in the json files, the dashboard uids wil...
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-agents#378
File: prototypes/dashboards/dashboard-deployment/provisioning/dashboards/overview_of_devices.json:88-95
Timestamp: 2025-07-03T14:38:41.016Z
Learning: In provisioned Grafana dashboards where UIDs are hardcoded in the JSON files, the dashboard UIDs will remain consistent across deployments, making hardcoded cross-dashboard links viable. This differs from manually imported dashboards where UIDs may change and break hardcoded links.

Applied to files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
📚 Learning: when using grafana dashboard row repetition, always repeat on filtered/scoped variables rather than ...
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-agents#291
File: prototypes/dashboards/dashboard-json-files/device_overview.json:199-204
Timestamp: 2025-06-26T07:29:46.702Z
Learning: When using Grafana dashboard row repetition, always repeat on filtered/scoped variables rather than broad variables that contain all possible values. In device monitoring dashboards, use filtered_devices instead of the full device list to prevent performance issues from creating thousands of repeated panels.

Applied to files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
📚 Learning: in dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml, hard-coded tes...
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-data-agent-examples#2
File: dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml:18-23
Timestamp: 2025-08-04T11:56:34.760Z
Learning: In dashboard-deployments/system-monitoring-influxdb2-flux-grafana/docker-compose.yml, hard-coded test credentials (test/testtest) and admin token are intentionally used to make it as easy as possible for new people to quickly test the stack. The production setup with docker-compose.prod.yml uses secure environment variables instead.

Applied to files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
📚 Learning: when creating cross-dashboard links in grafana json files, avoid hardcoding dashboard uids directly ...
Learnt from: daniel-falk
PR: fixedit-ai/fixedit-agents#0
File: :0-0
Timestamp: 2025-07-03T13:13:10.087Z
Learning: When creating cross-dashboard links in Grafana JSON files, avoid hardcoding dashboard UIDs directly in URLs. Instead, use template variables with constant type to store target dashboard UIDs, making dashboards portable across Grafana instances. The pattern is: create a hidden constant variable for the target UID, then reference it in links as `/d/${dashboard_uid_variable:raw}?var-param=${__data.fields.field}`.

Applied to files:

  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
🔇 Additional comments (1)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1)

642-647: Good use of variable-based cross-dashboard links

The link to the Device Details dashboard uses the constant variable ${device_details_uid}, avoiding hard-coded UIDs in URLs and keeping the dashboard portable across Grafana instances.

@daniel-falk daniel-falk merged commit d611778 into main Aug 5, 2025
3 checks passed
@daniel-falk daniel-falk deleted the feature/add-monitoring-dashboard branch August 5, 2025 14:24
@coderabbitai coderabbitai bot mentioned this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants