问题描述
我对这些概念超级陌生,如果这很愚蠢,我深表歉意。我正在尝试使用Elasticsearch数据源在Grafana上可视化Metricbeat数据,这些数据源均在本地运行,但无法找到Metricbeat配置中添加“ beat.hostname”的位置。
我同时拥有Grafana和Metricbeat的最新版本,并且正在关注此article。在“创建仪表板”部分中,作者提到在安装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的真正用户,所以这部分将在您身边