Skip to content

fix(chart): correct inverted priority level mappings in Grafana dashboard#3932

Open
Goutham-Annem wants to merge 1 commit into
falcosecurity:masterfrom
Goutham-Annem:fix/grafana-dashboard-priority-levels
Open

fix(chart): correct inverted priority level mappings in Grafana dashboard#3932
Goutham-Annem wants to merge 1 commit into
falcosecurity:masterfrom
Goutham-Annem:fix/grafana-dashboard-priority-levels

Conversation

@Goutham-Annem

@Goutham-Annem Goutham-Annem commented Jun 28, 2026

Copy link
Copy Markdown

Summary

The Grafana dashboard's renameByRegex transforms had Falco's numeric priority levels exactly backwards.

Falco encodes priorities as (see userspace/engine/falco_common.h):

Number Level
0 Emergency
1 Alert
2 Critical
3 Error
4 Warning
5 Notice
6 Informational
7 Debug

The dashboard was mapping them in reverse order (0→"default", 1→"debug", …, 7→"alert", 8→"emergency"), which caused the wrong severity labels to appear on all pie-chart and time-series panels.

This PR fixes all four occurrences of the mapping block to match Falco's actual numeric encoding, and removes the spurious "8"→"emergency" entry (Falco has no priority 8).

Fixes #3926

Test plan

  • Deploy Falco with Prometheus metrics and Grafana, trigger alerts at known severity levels (e.g. Warning=4, Notice=5), confirm the dashboard panels label them correctly
Fix inverted priority level mappings in the Falco Grafana dashboard — numeric priorities were mapped in reverse order, causing incorrect severity labels on all dashboard panels.

…oard

Falco encodes rule priorities numerically as 0=Emergency (highest)
through 7=Debug (lowest). The dashboard's renameByRegex transforms
had this exactly backwards, mapping 0→"default", 1→"debug", …,
7→"alert", 8→"emergency", causing alert severity labels to be
displayed in the wrong order in all pie-chart and time-series panels.

Fix all four occurrences of the mapping block so they follow Falco's
actual encoding:
  0→emergency, 1→alert, 2→critical, 3→error,
  4→warning, 5→notice, 6→informational, 7→debug

The spurious "8"→"emergency" entry (no such Falco priority) is
removed.

Fixes falcosecurity#3926

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Goutham Annem <annem.usedu@gmail.com>
@poiana

poiana commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Goutham-Annem
Once this PR has been reviewed and has the lgtm label, please assign fededp for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
poiana requested a review from Kaizhe June 28, 2026 18:22
@poiana poiana added the size/M label Jun 28, 2026

@kunalworldwide kunalworldwide left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The mapping fix is clearly needed — the previous dashboard was showing inverted severity labels because the renameByRegex transforms assumed the opposite numeric encoding. Removing the spurious 8 -> emergency entry is also correct since Falco has no priority 8.

A chart-only change like this is easy to miss in code review, but the impact on operators using the Grafana dashboard is significant. Would it be worth adding a small unit test that loads the dashboard JSON and asserts the rename mappings? That would prevent a future regression if someone edits the dashboard via the Grafana UI and re-exports it.

LGTM otherwise.

@Goutham-Annem

Copy link
Copy Markdown
Author

Hi, just checking in — CI is passing and the branch is clean. Happy to make any adjustments if needed!

@Goutham-Annem

Copy link
Copy Markdown
Author

Friendly bump — any feedback on this one? Happy to make changes if needed.

@Goutham-Annem

Copy link
Copy Markdown
Author

Gentle ping on this one — CI is passing. Happy to address any feedback.

@Goutham-Annem

Copy link
Copy Markdown
Author

Friendly ping — CI is passing and this PR is ready for review. Would appreciate a look when you have a moment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

In the grafana Dashboard Cluster / Falco, the level logic is inverted with what is sent to prometheus and loki

3 participants