Skip to content

chore: add a panel with sent notifications rate#2415

Merged
jdobes merged 1 commit into
RedHatInsights:masterfrom
jdobes:notif_rate
Jul 13, 2026
Merged

chore: add a panel with sent notifications rate#2415
jdobes merged 1 commit into
RedHatInsights:masterfrom
jdobes:notif_rate

Conversation

@jdobes

@jdobes jdobes commented Jul 13, 2026

Copy link
Copy Markdown
Member

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Summary by Sourcery

Enhancements:

  • Introduce a sent notifications per second panel sourced from Prometheus metrics to the vulnerability engine Grafana dashboard.

@sourcery-ai

sourcery-ai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a new Grafana timeseries panel showing the rate of sent notifications, using Prometheus metrics and consistent styling with existing panels.

File-Level Changes

Change Details Files
Introduce a new Grafana timeseries panel that graphs the sent notifications rate from Prometheus metrics.
  • Configure Prometheus as the datasource using the shared dashboard variable
  • Set field configuration (axis label, units, colors, thresholds, line style, legend, tooltip) to match existing dashboard conventions
  • Add a PromQL query summing the 5-minute rate of the ve_notificator_sent_notifs_cnt_total counter and label it as notifications per second
  • Place the panel within the dashboard grid with specified size and position, and assign a unique panel ID and title
monitoring/grafana/dashboards/grafana-dashboard-clouddot-insights-vulnerability-engine.configmap.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 1 issue, and left some high level feedback:

  • Consider whether summing ve_notificator_sent_notifs_cnt_total across all labels is desirable or if you should group by a key like service or tenant to preserve visibility into which source is driving notification volume.
  • The axis label notifs/sec and unit short are slightly inconsistent; you may want to use a rate-based unit (e.g., ops or a custom unit) or adjust the axis label to match the configured unit for clarity.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider whether summing `ve_notificator_sent_notifs_cnt_total` across all labels is desirable or if you should group by a key like service or tenant to preserve visibility into which source is driving notification volume.
- The axis label `notifs/sec` and unit `short` are slightly inconsistent; you may want to use a rate-based unit (e.g., `ops` or a custom unit) or adjust the axis label to match the configured unit for clarity.

## Individual Comments

### Comment 1
<location path="monitoring/grafana/dashboards/grafana-dashboard-clouddot-insights-vulnerability-engine.configmap.yml" line_range="7597-7550" />
<code_context>
+              "links": [],
+              "mappings": [],
+              "min": 0,
+              "thresholds": {
+                "mode": "absolute",
+                "steps": [
+                  {
+                    "color": "green"
+                  },
</code_context>
<issue_to_address>
**suggestion:** Revisit the threshold values to ensure they reflect meaningful limits for notifications per second.

Currently the thresholds use a single cutoff at `80` with just `green` and `red`, which may not map to meaningful states for notifications/sec (e.g., normal, warning, overload). Consider basing the values on known capacity or SLOs and possibly adding an intermediate `yellow` threshold so that color changes represent actionable conditions rather than arbitrary numbers.

Suggested implementation:

```
              "links": [],
              "mappings": [],
              "min": 0,
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "yellow",
                    "value": 60
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },

```

1. If there are other panels tracking notifications per second in this dashboard (or related dashboards), consider aligning their thresholds to the same ranges so that "green/yellow/red" semantics are consistent.
2. If you have specific SLOs or capacity figures, you may want to tweak the `60` and `90` values to better match those numbers (e.g. setting `yellow` near the sustained-capacity limit and `red` near overload).
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

"title": "Manager API Latency - 3scale",
"type": "heatmap"
},
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Revisit the threshold values to ensure they reflect meaningful limits for notifications per second.

Currently the thresholds use a single cutoff at 80 with just green and red, which may not map to meaningful states for notifications/sec (e.g., normal, warning, overload). Consider basing the values on known capacity or SLOs and possibly adding an intermediate yellow threshold so that color changes represent actionable conditions rather than arbitrary numbers.

Suggested implementation:

              "links": [],
              "mappings": [],
              "min": 0,
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "yellow",
                    "value": 60
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },

  1. If there are other panels tracking notifications per second in this dashboard (or related dashboards), consider aligning their thresholds to the same ranges so that "green/yellow/red" semantics are consistent.
  2. If you have specific SLOs or capacity figures, you may want to tweak the 60 and 90 values to better match those numbers (e.g. setting yellow near the sustained-capacity limit and red near overload).

@jdobes
jdobes enabled auto-merge (squash) July 13, 2026 14:16
@jdobes
jdobes merged commit dde4d55 into RedHatInsights:master Jul 13, 2026
8 of 9 checks passed
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.

2 participants