Metricbeat Apache 仪表板未显示可视化。 "Could not locate that index-pattern"

Metricbeat Apache dashboard is not showing visualizations. "Could not locate that index-pattern"

我有一个 Web 服务器 运行 metricbeat 并且已成功设置 Metricbeat 系统默认仪表板。不过,我似乎无法让 [Metricbeat Apache] 概览仪表板正常工作。应显示可视化效果的所有区域都有一个带有“!”的红色三角形。内部和错误,例如:

Could not locate that index-pattern (id: metricbeat-*), click here to re-create it

我无法单击显示 "click here to re-create it" 的文本。它不是可点击的对象。

我使用以下命令启用了 apache 模块:

metricbeat modules enable apache

我之前使用以下方法设置了仪表板:

metricbeat setup --dashboards

我检查了 /var/log/metricbeat/metricbeat 的 metricbeat 日志文件,但没有错误。如何使默认仪表板的 Metricbeat Apache 可视化正确显示?

我自己找到了答案:

就我而言,我没有正确设置 Apache 的 "server-status" 模块。由于 metricbeat 的 apache 模块依赖于此,因此无法正常工作。

我通过确保我可以访问 http://www.example.com/server-status 来解决这个问题 第

为此,我更改了(在 .htaccess 中):

RewriteEngine On

至:

RewriteEngine Off

完成后,仪表板开始工作。