Skip to content
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

Fix cluster settings collection when max_shards_per_node is manually set #603

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

akazs
Copy link
Contributor

@akazs akazs commented Jul 15, 2022

Signed-off-by: akazs 5749172+akazs@users.noreply.github.com

This PR fixes #509.

Signed-off-by: akazs <5749172+akazs@users.noreply.github.com>
Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

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

Is there a way to generate a test for the alternative case where max_shards_per_node is a JSON object?

@akazs
Copy link
Contributor Author

akazs commented Jul 20, 2022

@sysadmind
It's inside settings-persistent-clustermaxshartspernode-7.17.5.json under the default settings. This always exists (at least in 7.x and 8.x to date) when cluster.max_shards_per_node and cluster.max_shards_per_node.frozen are not in the same part of the settings (default, transient, persistent).

$ cat settings-persistent-clustermaxshartspernode-7.17.5.json | jq '.defaults.cluster."max_shards_per_node"'
{
  "frozen": "3000"
}

Should I also generate a case putting it in the persistent settings like this?
(In this case cluster.max_shards_per_node have to be in default or transient settings)

  "persistent": {
    "cluster": {
      "max_shards_per_node": {
        "frozen": "3000"
      }
    }
  },

Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the clarification. I missed the object further down.

@sysadmind sysadmind merged commit 102a9d3 into prometheus-community:master Jul 20, 2022
SuperQ added a commit that referenced this pull request Jul 28, 2022
* [FEATURE] Add metrics collection for data stream statistics #592
* [FEATURE] Support for AWS Elasticsearch using AWS SDK v2 #597
* [BUGFIX] Fix cluster settings collection when max_shards_per_node is manually set. #603

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Jul 28, 2022
SuperQ added a commit that referenced this pull request Jul 28, 2022
* [FEATURE] Add metrics collection for data stream statistics #592
* [FEATURE] Support for AWS Elasticsearch using AWS SDK v2 #597
* [BUGFIX] Fix cluster settings collection when max_shards_per_node is manually set. #603

Signed-off-by: SuperQ <superq@gmail.com>
SuperQ added a commit that referenced this pull request Jul 28, 2022
* [FEATURE] Add metrics collection for data stream statistics #592
* [FEATURE] Support for AWS Elasticsearch using AWS SDK v2 #597
* [BUGFIX] Fix cluster settings collection when max_shards_per_node is manually set. #603

Signed-off-by: SuperQ <superq@gmail.com>
jnadler pushed a commit to jnadler/elasticsearch_exporter that referenced this pull request Oct 27, 2022
…set (prometheus-community#603)

Signed-off-by: akazs <5749172+akazs@users.noreply.github.com>
jnadler pushed a commit to jnadler/elasticsearch_exporter that referenced this pull request Oct 27, 2022
* [FEATURE] Add metrics collection for data stream statistics prometheus-community#592
* [FEATURE] Support for AWS Elasticsearch using AWS SDK v2 prometheus-community#597
* [BUGFIX] Fix cluster settings collection when max_shards_per_node is manually set. prometheus-community#603

Signed-off-by: SuperQ <superq@gmail.com>
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.

Cluster settings collection fails when cluster.max_shards_per_node is set
2 participants