Skip to content

Conversation

@0xgouda
Copy link
Collaborator

@0xgouda 0xgouda commented Dec 1, 2025

  1. Remove $online_interval variable.
    • There is no reason for having a new time variable in addition to Grafana's time range.
  2. Migrate all panels to table format.
    • panels had 3 approaches to add the time column required by time series format:
      1. select 0 as time, ....
        • not necessary, remove 0 as time and use table format instead.
      2. select time, .....
        • same as above.
      3. select $__timeGroup(time, $online_interval) .... group by 1.
        • not necessary as the data is already filtered by the user-specified time range using $__timeFilter(time), so any further time grouping is not required, but actually can make the result imprecise, as some data that should be shown might fall into a different group that will be ignored.
  3. Remove where time > now() - '$online_interval'::interval and use $__timeFilter(time) instead.

TODO:

  • extra check on changed SQL queries to ensure I didn't break anything.

There is no need to use additional `$online_interval` variable,
we can directly use `$__timeFilter(time)` to get data only from the
time range used by users.

- `select 0 as time` and `select time` blocks are removed.
- `$__timeGroup($online_inteval` blocks are removed, as data is already
within the chosen time range no need for further grouping by time.
- `where time > now() - '$online_interval'::interval` are substituted
with `$__timeFilter(time)`.
@0xgouda 0xgouda added bug Something isn't working dashboards Grafana dashboards related labels Dec 1, 2025
@coveralls
Copy link

coveralls commented Dec 1, 2025

Pull Request Test Coverage Report for Build 19863725599

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 73.648%

Totals Coverage Status
Change from base Build 19825348195: 0.0%
Covered Lines: 3678
Relevant Lines: 4994

💛 - Coveralls

@0xgouda 0xgouda added enhancement New feature or request and removed bug Something isn't working labels Dec 1, 2025
@0xgouda 0xgouda self-assigned this Dec 1, 2025
@0xgouda 0xgouda marked this pull request as ready for review December 1, 2025 18:21
@0xgouda 0xgouda requested a review from pashagolub December 1, 2025 18:21
@0xgouda 0xgouda changed the title [-] migrate all panels in 0. Health Check dashboard to table format. [-] migrate all panels in 0. Health Check dashboard to table format Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboards Grafana dashboards related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants