Fetching 'agent'... Failed: Failed to fetch data from mycluster: Error(MKFetcherError('Agent exited with code 1: Failed to establish a connection at URL http://127.0.0.1:8001/version'))

I am using minikube, I have deployed collector using helm chart. I have used kubectl proxy and used the URL http://127.0.0.1:8001 in API end point. But I got error Fetching ‘agent’… Failed: Failed to fetch data from mycluster: Error(MKFetcherError(‘Agent exited with code 1: Failed to establish a connection at URL http://127.0.0.1:8001/version’)). Can Anyone help me in this?

More details:

  • I am using checkmk raw edition, which is deployed on the same minikube.
  • When I do a curl using the same URL, I am getting success response.

http://127.0.0.1:8001/version is a “special” URL that points to the local machine.

My guess is that you have minikube installed on a machine and that you access it through this URL from that machine. Further, I suspect you have Checkmk running in a container, either directly on the minikube host or inside the minikube cluster. In either case, the URL specified will not work from inside the Checkmk container, because inside the container the local machine that is referenced is the container itself, not the minikube host.

I’m not familiar with minikube, but I suspect you have a couple of options:

  1. Configure minikube to listen on an IP other than 127.0.0.1 and then connect to that endpoint from within the Checkmk container, or
  2. If Checkmk is running inside the minikube cluster, presumably there is an internal address (inside the minikube cluster) where the minikube API can be reached.

This is just my best guess as to what is happening, though.

Hope this helps,
Jason