X-Pack监控数据以及kibana可视化

一、cluster_stats

信息如下:

{
  "_index": ".monitoring-es-6-2020.02.16",
  "_type": "doc",
  "_id": "Bq0iTXABthGrDDJlET36",
  "_version": 1,
  "_score": null,
  "_source": {
    "cluster_uuid": "H9wXptqVTn-0gxT58ipMQQ",
    "timestamp": "2020-02-16T08:34:02.749Z",
    "interval_ms": 10000,
    "type": "cluster_stats",
    "source_node": {
      "uuid": "T9lfzUZJRQeAGJMBCeR64Q",
      "host": "10.124.152.203",
      "transport_address": "10.124.152.203:9301",
      "ip": "10.124.152.203",
      "name": "master-2",
      "timestamp": "2020-02-16T08:33:48.397Z"
    },
    "cluster_name": "es-logtest-cluster",
    "version": "6.8.5",
    "license": {
      "status": "active",
      "uid": "b5eabeef-7570-492f-99ff-6e3ff1c0b9db",
      "type": "platinum",
      "issue_date": "2019-12-11T00:00:00.000Z",
      "issue_date_in_millis": 1576022400000,
      "expiry_date": "2068-06-24T06:50:00.000Z",
      "expiry_date_in_millis": 3107746200000,
      "max_nodes": 100,
      "issued_to": "john smith (inspuronline)",
      "issuer": "Web Form",
      "start_date_in_millis": 1576022400000
    },
    "cluster_stats": {
      "cluster_uuid": "H9wXptqVTn-0gxT58ipMQQ",
      "timestamp": 1581842042721,
      "status": "green",
      "indices": {
        "count": 1089,
        "shards": {
          "total": 10764,
          "primaries": 5373,
          "replication": 1.003350083752094,
          "index": {
            "shards": {
              "min": 2,
              "max": 10,
              "avg": 9.884297520661157
            },
            "primaries": {
              "min": 1,
              "max": 5,
              "avg": 4.933884297520661
            },
            "replication": {
              "min": 1,
              "max": 2,
              "avg": 1.0055096418732783
            }
          }
        },
        "docs": {
          "count": 11368450755,
          "deleted": 2242273
        },
        "store": {
          "size_in_bytes": 3818751351248
        },
        "fielddata": {
          "memory_size_in_bytes": 12870454596,
          "evictions": 0
        },
        "query_cache": {
          "memory_size_in_bytes": 788531206,
          "total_count": 1013109742,
          "hit_count": 144601166,
          "miss_count": 868508576,
          "cache_size": 160522,
          "cache_count": 1368329,
          "evictions": 1207807
        },
        "completion": {
          "size_in_bytes": 0
        },
        "segments": {
          "count": 108719,
          "memory_in_bytes": 9694592227,
          "terms_memory_in_bytes": 6783125283,
          "stored_fields_memory_in_bytes": 2362867080,
          "term_vectors_memory_in_bytes": 0,
          "norms_memory_in_bytes": 98252480,
          "points_memory_in_bytes": 361699052,
          "doc_values_memory_in_bytes": 88648332,
          "index_writer_memory_in_bytes": 372755854,
          "version_map_memory_in_bytes": 28495759,
          "fixed_bit_set_memory_in_bytes": 15780536,
          "max_unsafe_auto_id_timestamp": 1581811898772,
          "file_sizes": {}
        }
      },
      "nodes": {
        "count": {
          "total": 8,
          "data": 5,
          "coordinating_only": 0,
          "master": 3,
          "ingest": 8
        },
        "versions": [
          "6.8.5"
        ],
        "os": {
          "available_processors": 256,
          "allocated_processors": 256,
          "names": [{
            "name": "Linux",
            "count": 8
          }],
          "pretty_names": [{
            "pretty_name": "CentOS Linux 7 (Core)",
            "count": 8
          }],
          "mem": {
            "total_in_bytes": 2163690635264,
            "free_in_bytes": 45403422720,
            "used_in_bytes": 2118287212544,
            "free_percent": 2,
            "used_percent": 98
          }
        },
        "process": {
          "cpu": {
            "percent": 61
          },
          "open_file_descriptors": {
            "min": 732,
            "max": 11636,
            "avg": 5189
          }
        },
        "jvm": {
          "max_uptime_in_millis": 5788995224,
          "versions": [{
            "version": "1.8.0_181",
            "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
            "vm_version": "25.181-b13",
            "vm_vendor": "Oracle Corporation",
            "count": 8
          }],
          "mem": {
            "heap_used_in_bytes": 110489884576,
            "heap_max_in_bytes": 223880937472
          },
          "threads": 3303
        },
        "fs": {
          "total_in_bytes": 45311344541696,
          "free_in_bytes": 42367144579072,
          "available_in_bytes": 40082782547968
        },
        "plugins": [],
        "network_types": {
          "transport_types": {
            "security4": 8
          },
          "http_types": {
            "security4": 8
          }
        }
      }
    },
    "cluster_state": {
      "nodes_hash": 2014429523,
      "status": "green",
      "cluster_uuid": "H9wXptqVTn-0gxT58ipMQQ",
      "version": 38006,
      "state_uuid": "3g_n5_USQiKLRaP6rCgn-A",
      "master_node": "T9lfzUZJRQeAGJMBCeR64Q",
      "nodes": {
        "OA3QQsb3Tr-K8Dpx_e93aw": {
          "name": "master-1",
          "ephemeral_id": "22XkJfvlQPu7oEkuMB1tsg",
          "transport_address": "10.124.152.202:9301",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "ml.enabled": "true"
          }
        },
        "wQDx3NxRSX-rxfGT_5yK6Q": {
          "name": "node-1",
          "ephemeral_id": "zsdSYmJeQ-6oHDzeT91zag",
          "transport_address": "10.124.152.202:9300",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "box_type": "hot",
            "ml.enabled": "true"
          }
        },
        "hcKp-flzQDKKd6cYVJ-t1g": {
          "name": "node-2",
          "ephemeral_id": "NoJKH-imSVmsycB9BVkPiA",
          "transport_address": "10.124.152.203:9300",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "box_type": "hot",
            "ml.enabled": "true"
          }
        },
        "9fDi33oAQh-vPvB73_f8_w": {
          "name": "node-5",
          "ephemeral_id": "McgTOogxS7m42Ufbm0I15Q",
          "transport_address": "10.124.152.206:9300",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "box_type": "cold",
            "ml.enabled": "true"
          }
        },
        "LziESYzaQsSYp7NNR1YEMQ": {
          "name": "node-4",
          "ephemeral_id": "L2WdYQ_HSDOGj8wgUAhBBg",
          "transport_address": "10.124.152.205:9300",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "box_type": "cold",
            "ml.enabled": "true"
          }
        },
        "mfVHfvYrSOmsaaO9hIpqtw": {
          "name": "node-3",
          "ephemeral_id": "GhWALVmKRr2OyGB2i_Ae5w",
          "transport_address": "10.124.152.204:9300",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "box_type": "hot",
            "ml.enabled": "true"
          }
        },
        "T9lfzUZJRQeAGJMBCeR64Q": {
          "name": "master-2",
          "ephemeral_id": "oCMJqo0KSpS1sel_Q8v-YA",
          "transport_address": "10.124.152.203:9301",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "xpack.installed": "true",
            "ml.max_open_jobs": "20",
            "ml.enabled": "true"
          }
        },
        "Yl4bGaV3Q-OdVQ5pemevZQ": {
          "name": "master-3",
          "ephemeral_id": "Jj8y3k9bSy2ihlucyEai-w",
          "transport_address": "10.124.152.204:9301",
          "attributes": {
            "ml.machine_memory": "270461329408",
            "ml.max_open_jobs": "20",
            "xpack.installed": "true",
            "ml.enabled": "true"
          }
        }
      }
    },
    "stack_stats": {
      "apm": {
        "found": false
      },
      "xpack": {
        "security": {
          "available": true,
          "enabled": true,
          "realms": {
            "file": {
              "name": [
                "default_file"
              ],
              "available": true,
              "cache": [{
                "size": 0
              }],
              "size": [
                0
              ],
              "enabled": true,
              "order": [
                2147483647
              ]
            },
            "ldap": {
              "available": true,
              "enabled": false
            },
            "native": {
              "name": [
                "default_native"
              ],
              "available": true,
              "cache": [{
                "size": 1
              }],
              "size": [
                3
              ],
              "enabled": true,
              "order": [
                2147483647
              ]
            },
            "saml": {
              "available": true,
              "enabled": false
            },
            "kerberos": {
              "available": true,
              "enabled": false
            },
            "active_directory": {
              "available": true,
              "enabled": false
            },
            "pki": {
              "available": true,
              "enabled": false
            }
          },
          "roles": {
            "native": {
              "size": 3,
              "fls": true,
              "dls": false
            },
            "file": {
              "size": 0,
              "fls": false,
              "dls": false
            }
          },
          "role_mapping": {
            "native": {
              "size": 0,
              "enabled": 0
            }
          },
          "ssl": {
            "http": {
              "enabled": false
            },
            "transport": {
              "enabled": true
            }
          },
          "audit": {
            "outputs": [
              "logfile"
            ],
            "enabled": false
          },
          "ipfilter": {
            "http": false,
            "transport": false
          },
          "anonymous": {
            "enabled": false
          }
        },
        "monitoring": {
          "available": true,
          "enabled": true,
          "collection_enabled": true,
          "enabled_exporters": {
            "local": 1
          }
        },
        "watcher": {
          "available": true,
          "enabled": true,
          "execution": {
            "actions": {
              "index": {
                "total": 876,
                "total_time_in_ms": 617110
              },
              "_all": {
                "total": 96155,
                "total_time_in_ms": 36575486
              },
              "email": {
                "total": 876,
                "total_time_in_ms": 108
              }
            }
          },
          "watch": {
            "input": {
              "chain": {
                "total": 6,
                "active": 6
              },
              "_all": {
                "total": 6,
                "active": 6
              }
            },
            "condition": {
              "_all": {
                "total": 6,
                "active": 6
              },
              "script": {
                "total": 6,
                "active": 6
              }
            },
            "transform": {
              "script": {
                "total": 6,
                "active": 6
              },
              "_all": {
                "total": 6,
                "active": 6
              }
            },
            "metadata": {
              "total": 6,
              "active": 6
            },
            "action": {
              "condition": {
                "script": {
                  "total": 6,
                  "active": 6
                },
                "_all": {
                  "total": 6,
                  "active": 6
                }
              },
              "index": {
                "total": 6,
                "active": 6
              },
              "email": {
                "total": 6,
                "active": 6
              },
              "_all": {
                "total": 12,
                "active": 12
              }
            },
            "trigger": {
              "schedule": {
                "total": 6,
                "active": 6,
                "interval": {
                  "total": 6,
                  "active": 6
                },
                "_all": {
                  "total": 6,
                  "active": 6
                }
              },
              "_all": {
                "total": 6,
                "active": 6
              }
            }
          },
          "count": {
            "total": 6,
            "active": 6
          }
        },
        "ml": {
          "available": true,
          "enabled": true,
          "jobs": {
            "_all": {
              "count": 0,
              "detectors": {
                "total": 0,
                "min": 0,
                "avg": 0,
                "max": 0
              },
              "model_size": {
                "total": 0,
                "min": 0,
                "avg": 0,
                "max": 0
              },
              "forecasts": {
                "total": 0,
                "forecasted_jobs": 0
              }
            }
          },
          "datafeeds": {
            "_all": {
              "count": 0
            }
          },
          "node_count": 8
        },
        "ilm": {},
        "logstash": {
          "available": true,
          "enabled": true
        },
        "ccr": {
          "available": true,
          "enabled": true,
          "follower_indices_count": 0,
          "auto_follow_patterns_count": 0
        },
        "graph": {
          "available": true,
          "enabled": true
        },
        "sql": {
          "available": true,
          "enabled": true,
          "features": {
            "having": 0,
            "subselect": 0,
            "limit": 0,
            "orderby": 0,
            "where": 0,
            "groupby": 0,
            "join": 0,
            "command": 0,
            "local": 0
          },
          "queries": {
            "cli": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "rest": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "canvas": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "odbc": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "jdbc": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "odbc32": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "odbc64": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "_all": {
              "total": 0,
              "paging": 0,
              "failed": 0
            },
            "translate": {
              "count": 0
            }
          }
        },
        "rollup": {
          "available": true,
          "enabled": true
        }
      }
    }
  },
  "sort": [
    1581842042749
  ]
}
View Code

 

二、node_stats

{
  "_index": ".monitoring-es-6-2020.02.16",
  "_type": "doc",
  "_id": "8etGTXABj1SqfF7FRVOz",
  "_version": 1,
  "_score": null,
  "_source": {
    "cluster_uuid": "H9wXptqVTn-0gxT58ipMQQ",
    "timestamp": "2020-02-16T09:13:35.788Z",
    "interval_ms": 10000,
    "type": "node_stats",
    "source_node": {
      "uuid": "LziESYzaQsSYp7NNR1YEMQ",
      "host": "10.124.152.205",
      "transport_address": "10.124.152.205:9300",
      "ip": "10.124.152.205",
      "name": "node-4",
      "timestamp": "2020-02-16T09:13:35.788Z"
    },
    "node_stats": {
      "node_id": "LziESYzaQsSYp7NNR1YEMQ",
      "node_master": false,
      "mlockall": false,
      "indices": {
        "docs": {
          "count": 1691264488
        },
        "store": {
          "size_in_bytes": 294214821808
        },
        "indexing": {
          "index_total": 10525050089,
          "index_time_in_millis": 2441618000,
          "throttle_time_in_millis": 0
        },
        "search": {
          "query_total": 12200874,
          "query_time_in_millis": 11681318
        },
        "query_cache": {
          "memory_size_in_bytes": 0,
          "hit_count": 0,
          "miss_count": 10672516,
          "evictions": 0
        },
        "fielddata": {
          "memory_size_in_bytes": 403220924,
          "evictions": 0
        },
        "segments": {
          "count": 7326,
          "memory_in_bytes": 738595332,
          "terms_memory_in_bytes": 525343499,
          "stored_fields_memory_in_bytes": 177341144,
          "term_vectors_memory_in_bytes": 0,
          "norms_memory_in_bytes": 6706560,
          "points_memory_in_bytes": 25414553,
          "doc_values_memory_in_bytes": 3789576,
          "index_writer_memory_in_bytes": 85707525,
          "version_map_memory_in_bytes": 20836766,
          "fixed_bit_set_memory_in_bytes": 0
        },
        "request_cache": {
          "memory_size_in_bytes": 416759,
          "evictions": 0,
          "hit_count": 100393,
          "miss_count": 788
        }
      },
      "os": {
        "cpu": {
          "load_average": {
            "1m": 0.59,
            "5m": 0.51,
            "15m": 0.45
          }
        },
        "cgroup": {
          "cpuacct": {
            "control_group": "/user.slice",
            "usage_nanos": 27482041123843550
          },
          "cpu": {
            "control_group": "/user.slice",
            "cfs_period_micros": 100000,
            "cfs_quota_micros": -1,
            "stat": {
              "number_of_elapsed_periods": 0,
              "number_of_times_throttled": 0,
              "time_throttled_nanos": 0
            }
          },
          "memory": {
            "control_group": "/user.slice",
            "limit_in_bytes": "9223372036854771712",
            "usage_in_bytes": "213718216704"
          }
        }
      },
      "process": {
        "open_file_descriptors": 2460,
        "max_file_descriptors": 655350,
        "cpu": {
          "percent": 1
        }
      },
      "jvm": {
        "mem": {
          "heap_used_in_bytes": 23353312448,
          "heap_used_percent": 72,
          "heap_max_in_bytes": 32011649024
        },
        "gc": {
          "collectors": {
            "young": {
              "collection_count": 343494,
              "collection_time_in_millis": 19562164
            },
            "old": {
              "collection_count": 3346,
              "collection_time_in_millis": 10191922
            }
          }
        }
      },
      "thread_pool": {
        "generic": {
          "threads": 59,
          "queue": 0,
          "rejected": 0
        },
        "get": {
          "threads": 32,
          "queue": 0,
          "rejected": 0
        },
        "index": {
          "threads": 0,
          "queue": 0,
          "rejected": 0
        },
        "management": {
          "threads": 5,
          "queue": 0,
          "rejected": 0
        },
        "search": {
          "threads": 49,
          "queue": 0,
          "rejected": 0
        },
        "watcher": {
          "threads": 50,
          "queue": 0,
          "rejected": 0
        },
        "write": {
          "threads": 32,
          "queue": 0,
          "rejected": 0
        }
      },
      "fs": {
        "total": {
          "total_in_bytes": 10908285698048,
          "free_in_bytes": 10601540993024,
          "available_in_bytes": 10051768401920
        },
        "io_stats": {
          "total": {
            "operations": 743189215,
            "read_operations": 32979694,
            "write_operations": 710209521,
            "read_kilobytes": 3100341888,
            "write_kilobytes": 18876686200
          }
        }
      }
    }
  },
  "sort": [
    1581844415788
  ]
}
View Code

 

 

三、index_stats

{
  "_index": ".monitoring-es-6-2020.02.16",
  "_type": "doc",
  "_id": "82RXTXABthGrDDJl2e03",
  "_version": 1,
  "_score": null,
  "_source": {
    "cluster_uuid": "H9wXptqVTn-0gxT58ipMQQ",
    "timestamp": "2020-02-16T09:32:44.343Z",
    "interval_ms": 10000,
    "type": "index_stats",
    "source_node": {
      "uuid": "T9lfzUZJRQeAGJMBCeR64Q",
      "host": "10.124.152.203",
      "transport_address": "10.124.152.203:9301",
      "ip": "10.124.152.203",
      "name": "master-2",
      "timestamp": "2020-02-16T09:32:38.510Z"
    },
    "index_stats": {
      "index": "app-testfxdhn-2020-02-05",
      "uuid": "IVdCaaTsSSu19h-hSXb8Kw",
      "created": 1580832294762,
      "status": "green",
      "shards": {
        "total": 10,
        "primaries": 5,
        "replicas": 1,
        "active_total": 10,
        "active_primaries": 5,
        "active_replicas": 5,
        "unassigned_total": 0,
        "unassigned_primaries": 0,
        "unassigned_replicas": 0,
        "initializing": 0,
        "relocating": 0
      },
      "total": {
        "docs": {
          "count": 7372450
        },
        "store": {
          "size_in_bytes": 996417360
        },
        "indexing": {
          "index_total": 0,
          "index_time_in_millis": 0,
          "throttle_time_in_millis": 0
        },
        "search": {
          "query_total": 9076,
          "query_time_in_millis": 9247
        },
        "merges": {
          "total_size_in_bytes": 0
        },
        "refresh": {
          "total_time_in_millis": 15
        },
        "query_cache": {
          "memory_size_in_bytes": 0,
          "hit_count": 0,
          "miss_count": 33948,
          "evictions": 0
        },
        "fielddata": {
          "memory_size_in_bytes": 0,
          "evictions": 0
        },
        "segments": {
          "count": 118,
          "memory_in_bytes": 2935146,
          "terms_memory_in_bytes": 1992076,
          "stored_fields_memory_in_bytes": 698576,
          "term_vectors_memory_in_bytes": 0,
          "norms_memory_in_bytes": 87040,
          "points_memory_in_bytes": 135766,
          "doc_values_memory_in_bytes": 21688,
          "index_writer_memory_in_bytes": 0,
          "version_map_memory_in_bytes": 0,
          "fixed_bit_set_memory_in_bytes": 0
        },
        "request_cache": {
          "memory_size_in_bytes": 9202,
          "evictions": 0,
          "hit_count": 0,
          "miss_count": 12
        }
      },
      "primaries": {
        "docs": {
          "count": 3686225
        },
        "store": {
          "size_in_bytes": 498208680
        },
        "indexing": {
          "index_total": 0,
          "index_time_in_millis": 0,
          "throttle_time_in_millis": 0
        },
        "search": {
          "query_total": 3050,
          "query_time_in_millis": 3526
        },
        "merges": {
          "total_size_in_bytes": 0
        },
        "refresh": {
          "total_time_in_millis": 0
        },
        "query_cache": {
          "memory_size_in_bytes": 0,
          "hit_count": 0,
          "miss_count": 10562,
          "evictions": 0
        },
        "fielddata": {
          "memory_size_in_bytes": 0,
          "evictions": 0
        },
        "segments": {
          "count": 59,
          "memory_in_bytes": 1467573,
          "terms_memory_in_bytes": 996038,
          "stored_fields_memory_in_bytes": 349288,
          "term_vectors_memory_in_bytes": 0,
          "norms_memory_in_bytes": 43520,
          "points_memory_in_bytes": 67883,
          "doc_values_memory_in_bytes": 10844,
          "index_writer_memory_in_bytes": 0,
          "version_map_memory_in_bytes": 0,
          "fixed_bit_set_memory_in_bytes": 0
        },
        "request_cache": {
          "memory_size_in_bytes": 4601,
          "evictions": 0,
          "hit_count": 0,
          "miss_count": 6
        }
      }
    }
  },
  "sort": [
    1581845564343
  ]
}
View Code

 

 

总结

 

 

 

 

 

 

 

node1,node2,node3是hot节点,node4,node5是cold节点。

集群统计: data:3.5T,document:11b左右,shards为10774, indices为1090

节点统计: data:3.5T,document:22b左右,shards为10774, indices为966+127=1093

Elasticsearch 主要监控指标 -- 描述了es监控的几个维度,相当不错!

原文地址:https://www.cnblogs.com/1zhangwenjing/p/12317859.html