Docker 健康检查指标集
编辑Docker 健康检查指标集编辑
Docker healthcheck
指标集收集有关运行中的 Docker 容器的健康检查状态指标。
健康检查数据仅在使用 docker HEALTHCHECK
指令构建 docker 镜像的 docker 容器中可用。
这是一个默认指标集。如果主机模块未配置,则默认情况下启用此指标集。
有关指标集中的每个字段的描述,请参阅导出字段 部分。
以下是此指标集生成的示例文档
{ "@timestamp": "2017-10-12T08:05:34.853Z", "agent": { "hostname": "host.example.com", "name": "host.example.com" }, "container": { "id": "cc78e58acfda4501105dc4de8e3ae218f2da616213e6e3af168c40103829302a", "image": { "name": "metricbeat_elasticsearch" }, "name": "metricbeat_elasticsearch_1_df866b3a7b3d", "runtime": "docker" }, "docker": { "container": { "labels": { "com_docker_compose_config-hash": "e3e0a2c6e5d1afb741bc8b1ecb09cda0395886b7a3e5084a9fd110be46d70f78", "com_docker_compose_container-number": "1", "com_docker_compose_oneoff": "False", "com_docker_compose_project": "metricbeat", "com_docker_compose_service": "elasticsearch", "com_docker_compose_slug": "df866b3a7b3d50c0802350cbe58ee5b34fa32b7f6ba7fe9e48cde2c12dd0201d", "com_docker_compose_version": "1.23.1", "license": "Elastic License", "org_label-schema_build-date": "20181006", "org_label-schema_license": "GPLv2", "org_label-schema_name": "elasticsearch", "org_label-schema_schema-version": "1.0", "org_label-schema_url": "https://elastic.ac.cn/products/elasticsearch", "org_label-schema_vcs-url": "https://github.com/elastic/elasticsearch-docker", "org_label-schema_vendor": "Elastic", "org_label-schema_version": "6.5.1" } }, "healthcheck": { "event": { "end_date": "2019-02-25T10:59:07.472Z", "exit_code": 0, "output": " % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r100 338 100 338 0 0 13188 0 --:--:-- --:--:-- --:--:-- 13520\n{\n \"license\" : {\n \"status\" : \"active\",\n \"uid\" : \"ea5a516e-d9ee-4131-8eec-b39741e80869\",\n \"type\" : \"basic\",\n \"issue_date\" : \"2019-02-25T10:18:24.885Z\",\n \"issue_date_in_millis\" : 1551089904885,\n \"max_nodes\" : 1000,\n \"issued_to\" : \"docker-cluster\",\n \"issuer\" : \"elasticsearch\",\n \"start_date_in_millis\" : -1\n }\n}\n", "start_date": "2019-02-25T10:59:07.342Z" }, "failingstreak": 0, "status": "healthy" } }, "event": { "dataset": "docker.healthcheck", "duration": 115000, "module": "docker" }, "metricset": { "name": "healthcheck" }, "service": { "address": "/var/run/docker.sock", "type": "docker" } }