监控部署在 (GKE) 集群上的 Nginx

Monitor the Nginx which is deployed on (GKE) cluster

我想监控 Nginx 请求(5xx、4xx、3xx、2xx),其中多个应用程序是 运行 多个域 url,Nginx 部署为:部署在 GKE 集群上。 有没有办法实时监控?

Cloud的监控模块时移时移。目前,最常见的应用程序监控方式是 Prometheus 和 Grafana。

Prometheus 是定义如何从应用程序收集指标的应用程序。在 NGINX 端,您需要部署 exporter。然后,您可以指示普罗米修斯从导出器发布的端点获取指标。

确认 Prometheus 获得所有指标后,您可以将 Prometheus 与 Grafana 挂钩。社区中有很多预定义的仪表板。来自 NGINX inc. 的官方版本。可以在这个link中找到。您可以将仪表板导入您的 Grafana 实例。

grafana和prometheus都可以用helm安装。请参考这两个仓库,https://github.com/grafana/helm-charts and https://github.com/prometheus-community/helm-charts.