-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[proxysql] Generate metric for all pairs of hostgroup/status (backend) #19438
base: master
Are you sure you want to change the base?
Conversation
NB: I've also notified the Datadog support about this issue => request #1997802 |
1 - can you add the changelog entry for this change: 2 - can you fix the linter: |
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.
Change requested.
Hello,
I'm not a Datadog employee, I know nothing about your internal process here 😬
So, can you handle this for us ? |
The datadog agent is designed to only collect metrics when present, so a missing value do not translate into 0 but rather into nothing (no value, no tags) until it gets generated. We can make the change on your behalf(might take some time though), however, after having a second look at it and checking for other similar requests (none found) , we believe it would be better to hide this behaviour behind a config option for this integration that is disabled by default but can be enabled for customers who want it. The reason behind is to avoid generating the extra metrics for other customers and break the current behaviour. As for ddev, it is not restricted to datadog internal process, for future references you can check these docs: |
What does this PR do?
Ensure that the count metric is always generated, even when 0 backend exists in that status & hostgroup at the moment.
Motivation
Today, when a hostgroup has no
online
backend server for example, the metric with tagstatus=ONLINE
+hostgroup=42
is not generated at all (no value for sometime, until a backend is online).But having no online backend is an important piece of information to monitor a proxysql.
Example: a dashboard showing the nb of online backend servers per hostgroup is not giving a good observability if not showing the 0 value, because it has a different meaning than no value :(
NB: the list of hostgroups is dynamic (because it depends on config, thus different for each deployment), and the list of status is hardcoded (because fixed in proxysql, cf doc)
Tests
I've only tested the SQL query alone on a real proxysql:
Before:
Now:
=> same values than before (when not zero) ✅
=> and all other pairs of hostgroup+status are now also generated as 0 🆕
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged