elasticsearch - 在 Metricbeat 中设置 beat.hostname
问题描述
我对这些概念非常陌生,如果这是一件愚蠢的事情,我深表歉意。我正在尝试使用 Elasticsearch 数据源在 Grafana 上可视化 Metricbeat 数据,所有这些数据都在本地运行,但无法找到在 Metricbeat 配置中添加“beat.hostname”的位置。
我拥有 Grafana 和 Metricbeat 的最新版本,并且正在关注这篇文章。在“创建仪表板”部分,作者提到他在安装 Metricbeat 时使用了“beat.hostname=grafana”作为主机名。然后,他在查询编辑器字段中使用它来提取 Grafana 仪表板上的数据。
但是我们在哪里设置呢?我查看了 Metricbeat 文件夹中的两个 YAML 文件,但没有任何描述。
非常感谢你的帮助!
解决方案
我认为您只需在 metricbeat.yml 中引用“名称”变量
# ================================== General ===================================
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
name: "jeremy-laptop"
# The tags of the shipper are included in their own field with each
# transaction published.
tags: ["laptop", "ubuntu"]
你会发现这个值为“ host.name ”并能够对其进行过滤。
我不是 Grafana 的真正用户,所以这部分会站在你这边
推荐阅读
- html - 使用 CSS 在垂直线上居中对齐“圆”
- python - 从 Python 中的列表中随机选择一个而不重复
- python - Python 请求没有“表单数据”的登录网站
- python - Python:整洁的数据,我怎样才能随心所欲地转换这个表?
- entity-framework-migrations - Entity Framework Core 在初始创建后添加新迁移
- node.js - 无法将节点 js 应用程序连接到在 docker swarm 中运行的 mongodb
- woocommerce - woocommerce 获取可变产品属性值和名称
- database - 使用 ODBC 连接到 Hadoop 上的 Impala 表时出现问题
- docker - 为什么 docker 组件无法在 i kuberenets 部署中启动?
- kotlin - 如何使用 Kotlin Exposed 正确创建和连接数据库?