apache / apache/cloudstack

Export Virtual Router Health Checks to Prometheus

未關閉
#6,212 3 則留言 0 個 reaction 已指派 1 人 已被 @NuxRo 認領 在 GitHub 檢視
component:prometheus type:enhancement
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
7 天 14 小時
30 天內合併 PR
31

描述

##### ISSUE TYPE
* Enhancement Request

##### COMPONENT NAME
API, VR

##### CLOUDSTACK VERSION

~~~
4.16.0.0
~~~
But after my research, not available in current versions.

##### CONFIGURATION
N/A

##### OS / ENVIRONMENT
N/A

##### SUMMARY
For monitoring of Virtual Routers, there seems to be no way of having the health check results in Prometheus metrics endpoint.

Currently, we are querying health check results with a pull based method for every Virtual Router, that is really inefficient on a large scale of routers.

##### STEPS TO REPRODUCE
- Enable Prometheus Metrics
- Enable VR Health Checks
- Query CloudStack `/metrics` endpoint

##### EXPECTED RESULTS
Have VR health check metrics exported at the `/metrics` endpoint.

I thought of something like this, according to the current output of `getRouterHealthCheckResults`:

~~~ini
# TYPE cloudstack_virtualrouter_healthcheck_result stateset
# HELP cloudstack_virtualrouter_healthcheck_result Virtual Router Health Check result
cloudstack_virtualrouter_healthcheck_result{checkname="connectivity.test",zone="zone1",virtualrouter="i-123456-VM",network="test-network"} 1

# TYPE cloudstack_virtualrouter_healthcheck_lastcheck gauge
# HELP cloudstack_virtualrouter_healthcheck_lastcheck Virtual Router Health Check lastcheck timestamp
# UNIT cloudstack_virtualrouter_healthcheck_lastcheck seconds
cloudstack_virtualrouter_healthcheck_lastcheck{checkname="connectivity.test",zone="zone1",virtualrouter="i-123456-VM",network="test-network"} 1649228157
~~~

Maybe this is not 100% accurate to OpenMetrics, but I tried to follow the guidelines. Maybe somebody with more knowledge can have a look.

A drawback with this solution would be that we lose information of the check result message, as Prometheus is not designed to handle this.

##### ACTUAL RESULTS
Virtual Router Health Checks not present on the CloudStack Prometheus metrics endpoint

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。