添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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
sys.exit(main())
File “/omd/sites/monitor/lib/python/cmk/special_agents/agent_kubernetes.py”, line 1215, in main
api_data = ApiData(api_client)
File “/omd/sites/monitor/lib/python/cmk/special_agents/agent_kubernetes.py”, line 1007, in init
for node in nodes.items
File “/omd/sites/monitor/local/lib/python/kubernetes/client/api/core_v1_api.py”, 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/core_v1_api.py”, line 2020, in connect_get_node_proxy_with_path_with_http_info
collection_formats=collection_formats)
File “/omd/sites/monitor/local/lib/python/kubernetes/client/api_client.py”, line 353, in call_api
_preload_content, _request_timeout, _host)
File “/omd/sites/monitor/local/lib/python/kubernetes/client/api_client.py”, line 184, in __call_api
_request_timeout=_request_timeout)
File “/omd/sites/monitor/local/lib/python/kubernetes/client/api_client.py”, line 378, in request
headers=headers)
File “/omd/sites/monitor/local/lib/python/kubernetes/client/rest.py”, line 243, in GET
query_params=query_params)
File “/omd/sites/monitor/local/lib/python/kubernetes/client/rest.py”, 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:

https://$ {url}/api/v1/nodes/NODE_NAME/proxy/stats

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!