-
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
Add detailed_index_stats parameter to pull index-level metrics #10766
Add detailed_index_stats parameter to pull index-level metrics #10766
Conversation
…th cluster_stats if you want to pull index-level metrics
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
Co-authored-by: Jorie Helwig <joriephoto@gmail.com>
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.
Hi @missingcharacter thanks a lot for the PR! I left two initial comments
c = from_instance({'url': 'http://example.com', 'detailed_index_stats': True}) | ||
assert c.detailed_index_stats is True | ||
|
||
|
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.
Can you also add a test for running the check when this parameter is enabled, and assert the expected tags?
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.
@sarah-witt thanks and I addressed this comment in commit 0ffcd75
if value is not None: | ||
value = value.get(key) | ||
value = value.get(key.replace('\\', '')) |
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.
Can you add some unit tests for process_metric since the behavior is changing?
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 added the creation of an index that starts with a dot ".
" and added a check for this new index to test_index_metrics
and the new test I created called test_detailed_index_stats
in commit 0ffcd75
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.
👍🏻 from docs team
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.
Thanks for the PR! Could you add documentation about these metrics in metadata.csv
https://github.com/DataDog/integrations-core/blob/master/elastic/metadata.csv
Co-authored-by: Paul <paul.coignet@datadoghq.com>
@coignetp all tests pass now |
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.
Sorry for the noice and the back and forth, but in the end let's get rid of assert_all_metrics_covered
, as it seems we should apply this more broadly and it's out of scope of this PR
Co-authored-by: Paul <paul.coignet@datadoghq.com>
Co-authored-by: Paul <paul.coignet@datadoghq.com>
Co-authored-by: Paul <paul.coignet@datadoghq.com>
@coignetp and @sarah-witt all tests pass now |
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.
Thanks!
* [elasticsearch] Creating parameter detailed_index_stats to be used with cluster_stats if you want to pull index-level metrics * Update elastic/assets/configuration/spec.yaml Co-authored-by: Jorie Helwig <joriephoto@gmail.com> * [elastic] ddev validate config --sync elastic * [elastic] Adding tests for when an index name start with a dot "." * [elastic] Asserting all metrics instead of 1 at a time Co-authored-by: Paul <paul.coignet@datadoghq.com> * [tests] [detailed_index_stats] Asserting rest of metrics for tests to pass * [elastic] Adding correct columns to elastic/metadata.csv * [elastic] Adding missing metrics to metadata.csv * [elastic] Remove system.* metrics from metadata.csv for now Co-authored-by: Paul <paul.coignet@datadoghq.com> * [elastic] Remove system.* metrics from assert_metrics_using_metadata Co-authored-by: Paul <paul.coignet@datadoghq.com> * [elastic] Remove aggregator.assert_all_metrics_covered() Co-authored-by: Paul <paul.coignet@datadoghq.com> * [elastic] python-black on elastic/tests/test_elastic.py Co-authored-by: Jorie Helwig <joriephoto@gmail.com> Co-authored-by: Paul <paul.coignet@datadoghq.com> c6f368f
Thanks @coignetp @jtappa @sarah-witt |
* [elasticsearch] Creating parameter detailed_index_stats to be used with cluster_stats if you want to pull index-level metrics * Update elastic/assets/configuration/spec.yaml Co-authored-by: Jorie Helwig <joriephoto@gmail.com> * [elastic] ddev validate config --sync elastic * [elastic] Adding tests for when an index name start with a dot "." * [elastic] Asserting all metrics instead of 1 at a time Co-authored-by: Paul <paul.coignet@datadoghq.com> * [tests] [detailed_index_stats] Asserting rest of metrics for tests to pass * [elastic] Adding correct columns to elastic/metadata.csv * [elastic] Adding missing metrics to metadata.csv * [elastic] Remove system.* metrics from metadata.csv for now Co-authored-by: Paul <paul.coignet@datadoghq.com> * [elastic] Remove system.* metrics from assert_metrics_using_metadata Co-authored-by: Paul <paul.coignet@datadoghq.com> * [elastic] Remove aggregator.assert_all_metrics_covered() Co-authored-by: Paul <paul.coignet@datadoghq.com> * [elastic] python-black on elastic/tests/test_elastic.py Co-authored-by: Jorie Helwig <joriephoto@gmail.com> Co-authored-by: Paul <paul.coignet@datadoghq.com>
What does this PR do?
Creates a parameter called
detailed_index_stats
within theelastic
integration.In order to obtain index-level stats when
your cluster is hosted externally (i.e., you're not pointing to localhost)
, you'd set:cluster_stats: true
detailed_index_stats: true
Motivation
AWS OpenSearch integration does not have these metrics and I'd like to get as many stats as I can out of my cluster
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached