Filter hosts based on port

Hello, i am using auto discovery in kubernetes and some discovered hosts has port 0 on which health check is failing. I want to be able to filter those hosts and run icmp check for them. How can i achieve this with conditions?

My config as of now

      providers:
        - type: kubernetes
          templates:
          - condition: ~
            config:
              - type: http
                hosts: ["${data.host}:${data.port}"]
                schedule: "@every 30s"
                timeout: 15s

I see here conditions for ip but don't see for port

Was able to solve with condition like

          - condition:
              equals: 
                port: 0
2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.