如何在 metricbeat 中激活 diskio 变量?

How to activate diskio variables in metricbeat?

我正在尝试在 ELK 环境(Elasticsearch、Logstash 和 Kibana 环境)中使用 metricbeat 从虚拟机获取数据,但不幸的是我无法获取与 "system.diskio" 相关的数据。

我从 Kibana 收到的错误消息是:"This field is present in your Elasticsearch mapping but not in the 500 documents shown in the doc table. You may still be able to visualize or search on it."(见图)。

其他变量如cpu、内存、进程等已获取,但与system.diskio相关的变量尚未获取。

我一直在网上查找有关此错误的信息,但信息不明确,我不知道从哪里开始。你有什么想法吗?

虚拟机:

  1. 分销商 ID:Ubuntu
  2. 描述:Ubuntu 16.04.6 LTS
  3. 发布:16.04
  4. 代号:xenial

提前致谢。

非常简单,您只需要在配置文件中进行更改即 system.yml

文件位置:/etc/metricbeat/modules.d/system.yml,在这个文件中你会找到"metricsets"标题,你只需要un-comment diskio行。供您参考,我在这里发布了一个示例:

  • 模块:系统

    周期:10s

    指标集:

    • cpu
    • 加载
    • 内存
    • 网络
    • 进程
    • process_summary
    • socket_summary
    • 核心
    • 磁盘
    • 套接字

对配置文件进行更改后,只需重新启动您的 metricbeat 服务即可完成,希望这对您有所帮助。