Deprecated cadvisor stats with Kubernetes 1.18 and check-mk 1.6.0p18

Hi everyone.

I tried to connect my kubernetes cluster version 1.18 to my check_mk 1.6.0p18cre, with troubles. On the gui had 404 response.

Next I tried with the command line, and I had the same result:

OMD[monitor]:/opt/omd/versions/1.6.0p18.cre/share/check_mk/agents/special$ ./agent_kubernetes ‘-v’ ‘–debug’ ‘–token’ $token ‘–infos’ ‘nodes,services,deployments,pods,daemon_sets,stateful_sets’ ‘–port’ ${port} ‘–no-cert-check’ $host

Traceback (most recent call last):
File “./agent_kubernetes”, line 9, in
File “/omd/sites/monitor/lib/python/cmk/special_agents/”, line 1215, in main
api_data = ApiData(api_client)
File “/omd/sites/monitor/lib/python/cmk/special_agents/”, line 1007, in init
for node in nodes.items
File “/omd/sites/monitor/local/lib/python/kubernetes/client/api/”, line 1919, in connect_get_node_proxy_with_path
return self.connect_get_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501
File “/omd/sites/monitor/local/lib/python/kubernetes/client/api/”, line 2020, in connect_get_node_proxy_with_path_with_http_info
File “/omd/sites/monitor/local/lib/python/kubernetes/client/”, line 353, in call_api
_preload_content, _request_timeout, _host)
File “/omd/sites/monitor/local/lib/python/kubernetes/client/”, line 184, in __call_api
File “/omd/sites/monitor/local/lib/python/kubernetes/client/”, line 378, in request
File “/omd/sites/monitor/local/lib/python/kubernetes/client/”, line 243, in GET
File “/omd/sites/monitor/local/lib/python/kubernetes/client/”, line 233, in request
raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({‘Date’: ‘Tue, 17 Nov 2020 18:40:20 GMT’, ‘Content-Length’: ‘19’, ‘Content-Type’: ‘text/plain; charset=utf-8’, ‘Cache-Control’: ‘no-cache, private’})
HTTP response body: 404: Page Not Found

I continued with a deep debugging, watching the agent code, and I found a call to URL:


This url is available only when you active de flag –enable-cadvisor-json-endpoints on your kubernetes installation. This flag is deprecated and will be removed in future versions, so it will not be added by the most cloud providers.

Somebody knows if there are any roadmap to fix this situation? Or there are any workaround to can connect them without this flag?

Thank you!

1 Like