Azure政策(网守)通过Prometheus和Grafana在AK上监视
我已经通过Terraform启用了Azure策略,并应用于AKS群集。我可以看到豆荚已部署,启动并运行。我应用了内置的计划也有“审核”,以测试Azure策略在AKS群集上的工作方式。
$ kubectl get pods -n gatekeeper-system
NAME READY STATUS RESTARTS AGE
gatekeeper-audit-77754c7d8-g44qb 1/1 Running 0 44h
gatekeeper-controller-78cff9c89-7pftn 1/1 Running 0 44h
gatekeeper-controller-78cff9c89-8dsfg 1/1 Running 0 44h
我找到了一个仪表板 指标不同/缺失。不确定,因为,Azure管理此守门人!?。我在下面看到一些面板正在显示,Prometheus可以提供指标。例如,以下 OPA_SCORECARD_CORNTARANT_VIOLATIONS
不可避免。
如何正确通过Prometheus监视Azure策略
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为当您使用
azure策略(+gatekeeper)时,可以导出
opa_scorecard_constraint_violations
之类的指标,但是您只需导出Gatekeeper指标,您只需要创建一个服务监视以击中适当的端点。
我的服务监视器看起来像这样:
Grafana屏幕截图:
度量
I don't think metrics like
opa_scorecard_constraint_violations
can be exported when you're usingAzure Policies(+Gatekeeper)
However you can export gatekeeper metrics, you just need to create a service monitor to hit the proper endpoint.
My service monitor looks like this:
grafana screenshot:
metrics