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
exporter: promethize counter names #51069
Conversation
|
||
// just in case because there are some bluestore metrics which include a single ":" | ||
if (name.find(":") != std::string::npos) { | ||
boost::replace_all(name, ":", "_"); |
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.
I don't see this in promethize
in src/pybind/mgr/prometheus/module.py
?
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.
as the comment says, I saw a single colon around some bluestore metrics so I added that in just in case.
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.
Then promethize
in src/pybind/mgr/prometheus/module.py
needs to updated to the same. There can't be "just in case" here, both methods should do exactly the same thing.
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.
Yup, it's important to keep consistency with the existing metric names (even if the current approach was not the best possible). Otherwise, this will generate new time-series, and the existing Grafana Dashboards might have missing data.
Maybe those bluestore metrics are not exported due to their priority level?
Output with the new code. the "_", "+" has been properly replaced.
|
Only because |
I made the code replace all + with Another thing we could add is replace all invalid characters from the prometheus name regex they provide officially to underscores or something simliar but I don't feel like we need to reach that far for the current quick fix. |
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.
LGTM! Thank you, @pereman2 !
BTW, I see no "Fixes:...". Shouldn't this be linked to a bug report?
@pereman2 was so fast fixing this , that the bug creation took more time than post the pr ... :-D ,.. @pereman2, please, be sure to update the commit |
The windows tests fail with an error in one of the exporter files, the weird thing is that the offending line has not been modified.... and the line was introduced 9 monthsd ago ... @pereman2 what do you think? |
It's failing to build the test, not the daemon. I think the failure appeared because ceph-exporter isn't built for Windows but with this PR you are trying to build its test binary. You would need to disable that in Cc @petrutlucian94 to keep me honest. |
That's correct, please skip this test on Windows. Thanks! |
jenkins test make check |
jenkins test make check arm64 |
1 similar comment
jenkins test make check arm64 |
jenkins test dashboard cephadm |
1 similar comment
jenkins test dashboard cephadm |
jenkins test dashboard cephadm |
jenkins test dashboard cephadm |
jenkins test dashboard cephadm |
jenkins test make check |
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com> Fixes: https://tracker.ceph.com/issues/59475
@idryomov I've fixed the last comments from you. @avanthakkar can you give a brief on why this commit was added ? 4998f85 I've removed it completely as you didn't give any explanations on the commit plus it didn't follow naming conventions of commit messages. |
I temporarily added it to see the cephadm grafana e2e tests are passing or not without enabling the feature for fetching perf counters from prometheus module just to verify if nothing is breaking in any grafana dashboards. |
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.
Approving based on
For sure a more complete test coverage will be useful, and probably we need to set as priority. However, I suggest to be focused in this pr just in the problem to resolve.
As @jmolmo said, we should stick with the current purpose of this PR and @avanthakkar can work on on extending the testing suite.
@avanthakkar Can you link the respective tracker ticket here?
jenkins test windows |
jenkins test dashboard |
Ceph dashboard test failures not related with this change |
@idryomov As per your request in the CLT, I've created this tracker https://tracker.ceph.com/issues/59561 (we can split it as necessary) to track the integration tests on the exporter. cc: @jmolmo @avanthakkar |
exporter: promethize counter names
This fix assures that metrics coming from daemons perf counters have the same name if they are exported by the Prometheus manager module or by the Ceph exporter.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2186557