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

[Stack Monitoring] Put elasticsearch.node.stats.jvm.mem.pools.* #40571

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

pickypg
Copy link
Member

@pickypg pickypg commented Aug 20, 2024

This re-adds the pools to the node_stats metric set.

Proposed commit message

Adds the elasticsearch.node.stats.jvm.mem.pools.* fields to the metricset for node_stats because it was removed by accident in a previous release.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

No. The mappings have continued to exist.

Author's Checklist

  • Verify that the data appears in the node_stats metricset

How to test this PR locally

Configure Metricbeat:

metricbeat.modules:
- module: elasticsearch
  metricsets:
    - node_stats
  period: 10s
  hosts: ["http://es:9200"]

output.elasticsearch:
  hosts: ["http://es:9200"]

Connect to Elasticsearch and observe the data stream provides

GET /.ds-metricbeat-*/_search?q=metricset.name:node_stats&filter_path=hits.hits._source.elasticsearch.node.stats.jvm.mem.pools.*

Without this change, this does not exist in the resulting _source. With this change, you should see something along the lines of

{
  "hits" : {
    "hits" : [
      {
        "_source" : {
          "elasticsearch" : {
            "node" : {
              "stats" : {
                "jvm" : {
                  "mem" : {
                    "pools" : {
                      "survivor" : {
                        "peak" : {
                          "bytes" : 74424848
                        },
                        "peak_max" : {
                          "bytes" : 0
                        },
                        "used" : {
                          "bytes" : 12582912
                        },
                        "max" : {
                          "bytes" : 0
                        }
                      },
                      "old" : {
                        "used" : {
                          "bytes" : 90397592
                        },
                        "max" : {
                          "bytes" : 1073741824
                        },
                        "peak" : {
                          "bytes" : 91899520
                        },
                        "peak_max" : {
                          "bytes" : 1073741824
                        }
                      },
                      "young" : {
                        "peak" : {
                          "bytes" : 624951296
                        },
                        "peak_max" : {
                          "bytes" : 0
                        },
                        "used" : {
                          "bytes" : 293601280
                        },
                        "max" : {
                          "bytes" : 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    ]
  }
}

Related issues

Closes #40539

Use cases

Understand the different memory pools in the JVM.

This re-adds the pools to the `node_stats` metric set.
@pickypg pickypg added bug backport-8.15 Automated backport to the 8.15 branch with mergify labels Aug 20, 2024
@pickypg pickypg self-assigned this Aug 20, 2024
@pickypg pickypg requested a review from a team as a code owner August 20, 2024 21:41
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 20, 2024
@pickypg pickypg added the Team:Monitoring Stack Monitoring team label Aug 20, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 20, 2024
Copy link
Contributor

@consulthys consulthys left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

mergify bot commented Aug 22, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b monitoring/put-back-jvm-pools upstream/monitoring/put-back-jvm-pools
git merge upstream/main
git push upstream monitoring/put-back-jvm-pools

@pickypg pickypg enabled auto-merge (squash) August 22, 2024 15:26
@pickypg pickypg merged commit 9146875 into elastic:main Aug 22, 2024
29 checks passed
mergify bot pushed a commit that referenced this pull request Aug 22, 2024
…0571)

This re-adds the pools to the `node_stats` metric set.

(cherry picked from commit 9146875)
@pickypg pickypg deleted the monitoring/put-back-jvm-pools branch August 22, 2024 16:28
pickypg added a commit that referenced this pull request Aug 22, 2024
…ats.jvm.mem.pools.*` (#40590)

This re-adds the pools to the `node_stats` metric set.

(cherry picked from commit 9146875)

---------

Co-authored-by: Chris Earle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.15 Automated backport to the 8.15 branch with mergify bug Team:Monitoring Stack Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[metricbeat:elasticsearch module] Missing jvm.mem.pools metrics from node.stats
3 participants