Ad Widget

Collapse

"Kubernetes Cluster state by http" template on zabbix 6.0.5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lukeffo
    Junior Member
    • Feb 2023
    • 2

    #1

    "Kubernetes Cluster state by http" template on zabbix 6.0.5

    Hello All,

    first of all, thanks in advance for your time and your help here.

    i'm trying to configure the "kubernetes state by http" template on Zabbix 6.0.5, but at this time, i can collect only few metrics due to following error in many discovery rules:


    "Preprocessing failed for: {"error":"Error: cannot get URL: Couldn't connect to server."}
    1. Failed: cannot convert Prometheus data to JSON: data parsing error at row 1 "{"error":"Error: cannot get URL: Couldn't connect ...": cannot parse metric name"​



    I edited the 2 following macros in the host configuration and the same values are working properly on y with the kubernetes nodes by http template ( the macro for api endpoint is named "KUBE.API.ENDPOINT.URL in this one ):

    - {$KUBE.API.TOKEN}
    - {$KUBE.API.URL}


    Some infrastructure background here:

    1. zabbix server is running 6.0.5 ( 192.168.X.X )
    2. zabbix proxy, 6.0.5 ( 10.3.X.X ) via docker-compose in a different vm
    3. zabbix agents up and running as pod in the cluster ( used the official helm chart )



    Zabbix proxy shows following error in the log:

    [ Kubernetes ] ERROR: Error: cannot get URL: Couldn't connect to server.

    The api url value is the address shown as output of : kubectl cluster-info.


    It's quite weird because other discovery rules properly works for the same template:

    Click image for larger version

Name:	image.png
Views:	752
Size:	30.6 KB
ID:	459266


    What am i missing?
    How can i see further details regarding this error?

    Thanks again,

    Luca
  • bryanquadrado
    Junior Member
    • Dec 2023
    • 3

    #2
    Has anyone found a solution? I'm facing the same problem, and my configuration is very similar. I'm not sure what to do next.

    Comment

    Working...