我目前有一個配置有Heapster/InfluxDB/Grafana的Kubernetes集羣。cAdvisor使用heapster格式的自定義指標
我知道Kubelet現在有一個嵌入式cAdvisor實例,我已將其配置爲查看應用程序端點以收集自定義指標。
我遵循這個指南:http://guoshimin.github.io/2016/06/03/custom-metrics.html:
{
"endpoint" : "http://localhost:31234/sessions",
"metrics_config" : [
{
"name" : "activeSessions",
"metric_type" : "gauge",
"units" : "number of active sessions",
"data_type" : "int",
"polling_frequency" : 10,
"regex" : "Active sessions: ([0-9]+)"
}
]
}
目前Kubelet拋出錯誤 -
failed to create collector for container "/docker/664af6c4c1998514770371267ba6c117c532a448f6301f14fc53ca9798abff5b", config "prometheus": json: cannot unmarshal object into Go value of type string
它似乎認爲我使用的是普羅米修斯的配置。我應該使用不同的格式來收集指標並將它們傳遞給Heapster,因爲我的設置中沒有Prometheus?