Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Batch Metrics API #159

Conversation

ricardolstephen
Copy link
Contributor

@ricardolstephen ricardolstephen commented Jul 28, 2020

Issue #, if available:
opendistro-for-elasticsearch/performance-analyzer-rca#335

Description of changes:
Batch metrics API
Associated RCA change: opendistro-for-elasticsearch/performance-analyzer-rca#315

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ricardolstephen ricardolstephen changed the title Batch metrics api v3 Batch Metrics API Jul 28, 2020
sidheart
sidheart previously approved these changes Aug 27, 2020
Copy link
Contributor

@sidheart sidheart left a comment

Choose a reason for hiding this comment

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

lgtm again, just small nits, leaving a +1 because I trust that you'll make the small edits before you merge this

private static final String ENABLED = "enabled";
private static final String SHARDS_PER_COLLECTION = "shardsPerCollection";
private static final String CURRENT = "currentPerformanceAnalyzerClusterState";
private static final String NAME = "PerformanceAnalyzerClusterConfigAction";
private static final String BATCH_METRICS_RETENTION_PERIOD_MINUTES = "batchMetricsRetentionPeriodMinutes";
Copy link
Contributor

Choose a reason for hiding this comment

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

We aren't adding logic to update this via the API then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this will be a read-only parameter that the cluster owner can modify.

vigyasharma
vigyasharma previously approved these changes Aug 31, 2020
Copy link

@vigyasharma vigyasharma left a comment

Choose a reason for hiding this comment

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

Please address comments before merging.

README.md Outdated Show resolved Hide resolved
@@ -95,13 +107,15 @@ public int getCurrentClusterSettingValue() {
* @return the cluster setting value
*/
private Integer initializeClusterSettingValue(

Choose a reason for hiding this comment

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

Have we tested this across 1/ multi-node scenarios, 2/ clusters with nodes on different versions of this code (one node with this change and another on a version before this change) ?

Copy link
Contributor Author

@ricardolstephen ricardolstephen Sep 2, 2020

Choose a reason for hiding this comment

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

Ran these tests manually. See the test list in opendistro-for-elasticsearch/performance-analyzer-rca#315

README.md Outdated Show resolved Hide resolved
README.md Outdated

Note, the maximum number of datapoints that a single query can request for via API is capped at 100,800 datapoints. If a query exceeds this limit, an error is returned. The query parameters can be adjusted on such queries to request for fewer datapoints at a time.

The retention period for batch metrics can be adjusted by setting batch-metrics-retention-period-minutes in performance-analyzer.properties. The default value is 7, and values can range from 1 to 60 (inclusive).
Copy link
Contributor

Choose a reason for hiding this comment

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

we should be explicit that a really high value of the batch-metrics-retention-period-minutes will lead to heavy disk consumption. We should also have a max this can be set to, to avoid mistakes of setting it too high and then a read through the rest API crippling the cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already have a bounding range (1-60 inclusive). Will add the note about the disk consumption.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
sidheart
sidheart previously approved these changes Sep 8, 2020
vigyasharma
vigyasharma previously approved these changes Sep 8, 2020
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
vigyasharma
vigyasharma previously approved these changes Sep 10, 2020
@ricardolstephen ricardolstephen merged commit 080a62b into opendistro-for-elasticsearch:master Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants