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

Remove _nodes field from under cluster_stats as it's not being used #11955

Merged
merged 1 commit into from
May 3, 2019
Merged

Remove _nodes field from under cluster_stats as it's not being used #11955

merged 1 commit into from
May 3, 2019

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Apr 26, 2019

What it says on the tin.

Testing this PR

  1. Pull down this PR and build Metricbeat.

    cd metricbeat
    mage build
    
  2. Enable the elasticsearch-xpack Metricbeat module.

    ./metricbeat modules enable elasticsearch-xpack
    
  3. Start Metricbeat

    ./metricbeat -e
    
  4. Delete older .monitoring-es-* documents to start with a clean slate (makes it easier for testing).

    DELETE .monitoring-es-*
    
  5. Using Kibana Console check that the Metricbeat-indexed monitoring documents for Elasticsearch don't contain the cluster_stats._nodes field.

    GET .monitoring-es-7-mb-*/_search?q=type:cluster_stats
    

@ycombinator ycombinator requested a review from a team as a code owner April 26, 2019 17:01
@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring

@ycombinator
Copy link
Contributor Author

jenkins, test this

@cachedout
Copy link
Contributor

In testing this, I still see a _nodes field in cluster_stats:

          "cluster_stats" : {
            "cluster_uuid" : "Fz1ioHoiQyic2ovQ5cpT2w",
            "timestamp" : 1.556530486628E12,
            "status" : "yellow",
            "indices" : {
              "fielddata" : {
                "memory_size_in_bytes" : 12576,
                "evictions" : 0
              },
              "query_cache" : {
                "evictions" : 2084,
                "memory_size_in_bytes" : 4085183.0,
                "total_count" : 182204,
                "hit_count" : 10379,
                "miss_count" : 171825,
                "cache_size" : 1188,
                "cache_count" : 3272
              },
              "completion" : {
                "size_in_bytes" : 0
              },
              "segments" : {
                "count" : 99,
                "stored_fields_memory_in_bytes" : 86544,
                "norms_memory_in_bytes" : 13824,
                "index_writer_memory_in_bytes" : 1.6319468E7,
                "version_map_memory_in_bytes" : 568244,
                "doc_values_memory_in_bytes" : 454180,
                "fixed_bit_set_memory_in_bytes" : 53424,
                "term_vectors_memory_in_bytes" : 0,
                "max_unsafe_auto_id_timestamp" : -1,
                "file_sizes" : { },
                "memory_in_bytes" : 1283486.0,
                "terms_memory_in_bytes" : 663453,
                "points_memory_in_bytes" : 65485
              },
              "count" : 18,
              "shards" : {
                "replication" : 0,
                "index" : {
                  "shards" : {
                    "max" : 1,
                    "avg" : 1,
                    "min" : 1
                  },
                  "primaries" : {
                    "max" : 1,
                    "avg" : 1,
                    "min" : 1
                  },
                  "replication" : {
                    "min" : 0,
                    "max" : 0,
                    "avg" : 0
                  }
                },
                "total" : 18,
                "primaries" : 18
              },
              "docs" : {
                "count" : 440682,
                "deleted" : 124816
              },
              "store" : {
                "size_in_bytes" : 1.40293974E8
              }
            },
            "nodes" : {
              "network_types" : {
                "transport_types" : {
                  "security4" : 1
                },
                "http_types" : {
                  "security4" : 1
                }
              },
              "count" : {
                "data" : 1,
                "coordinating_only" : 0,
                "master" : 1,
                "ingest" : 1,
                "total" : 1
              },
              "jvm" : {
                "mem" : {
                  "heap_used_in_bytes" : 4.69675904E8,
                  "heap_max_in_bytes" : 1.037959168E9
                },
                "threads" : 141,
                "max_uptime_in_millis" : 1.24097021E8,
                "versions" : [
                  {
                    "vm_name" : "OpenJDK 64-Bit Server VM",
                    "vm_version" : "12+33",
                    "vm_vendor" : "Oracle Corporation",
                    "bundled_jdk" : true,
                    "using_bundled_jdk" : true,
                    "count" : 1,
                    "version" : "12"
                  }
                ]
              },
              "fs" : {
                "total_in_bytes" : 4.99963174912E11,
                "free_in_bytes" : 1.9303784448E11,
                "available_in_bytes" : 1.88011114496E11
              },
              "plugins" : [ ],
              "discovery_types" : {
                "zen" : 1
              },
              "packaging_types" : [
                {
                  "type" : "tar",
                  "count" : 1,
                  "flavor" : "default"
                }
              ],
              "versions" : [
                "8.0.0"
              ],
              "process" : {
                "cpu" : {
                  "percent" : 0
                },
                "open_file_descriptors" : {
                  "min" : 479,
                  "max" : 479,
                  "avg" : 479
                }
              },
              "os" : {
                "names" : [
                  {
                    "name" : "Mac OS X",
                    "count" : 1
                  }
                ],
                "pretty_names" : [
                  {
                    "pretty_name" : "Mac OS X",
                    "count" : 1
                  }
                ],
                "mem" : {
                  "total_in_bytes" : 3.4359738368E10,
                  "free_in_bytes" : 1.94225152E10,
                  "used_in_bytes" : 1.4937223168E10,
                  "free_percent" : 57,
                  "used_percent" : 43
                },
                "available_processors" : 12,
                "allocated_processors" : 12
              }
            },
            "_nodes" : {
              "failed" : 0,
              "total" : 1,
              "successful" : 1
            }

@ycombinator
Copy link
Contributor Author

@cachedout I just tested this PR locally and I'm not seeing thecluster_stats._nodes field. Is it possible you were looking at an older document (indexed before this PR's code was run)? I added a step in the testing instruction to delete old .monitoring-es-* documents to start with a clean slate. Mind re-testing this PR with that step?

@cachedout
Copy link
Contributor

@ycombinator Interesting. In my testing I explicitly deleted the index each time but perhaps I made a mistake somewhere? I will re-test.

@cachedout
Copy link
Contributor

My mistake! This works as described.

@ycombinator ycombinator merged commit 76a5fde into elastic:master May 3, 2019
@ycombinator ycombinator deleted the mb-es-xp-cs-nodes branch December 25, 2019 11:18
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants