Ad Widget

Collapse

Cant use domain name in zabbix_proxy.conf, work properly with ip of k8s cluster node

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joao.medeiros
    Junior Member
    • Feb 2022
    • 7

    #1

    Cant use domain name in zabbix_proxy.conf, work properly with ip of k8s cluster node

    Hi friends,

    I'm trying to implement Zabbix Server in Kubernetes, but I'm facing some difficulty with network communication between Zabbix Proxy and Zabbix-Server. Take a look at my scenario:

    Click image for larger version  Name:	zabbix-scenario.png Views:	0 Size:	34.9 KB ID:	440411
    zabbix.domain.com => 10.10.10.110 (HAPROXY)

    Configuring my zabbix_proxy.conf file, when I insert the ip address of the worker-1 node where are the zabbix pods in some moment, the communication works fine. But when I try to insert my domain as a value, doesn't.

    Click image for larger version

Name:	zabbix_proxy_conf.png
Views:	409
Size:	9.3 KB
ID:	440412

    Look the logs of Zabbix Proxy when I put zabbix.domain.com as Server value.
    Code:
    root@zabbix-proxy-02:/etc/zabbix# tail -f /var/log/zabbix/zabbix_proxy.log
    1051486:20220223:225627.200 proxy #95 started [icmp pinger #5]
    1051487:20220223:225627.201 proxy #96 started [icmp pinger #6]
    1051488:20220223:225627.201 proxy #97 started [icmp pinger #7]
    1051489:20220223:225627.202 proxy #98 started [icmp pinger #8]
    1051490:20220223:225627.203 proxy #99 started [icmp pinger #9]
    1051491:20220223:225627.203 proxy #100 started [icmp pinger #10]
    1051492:20220223:225627.204 proxy #101 started [history poller #1]
    1051493:20220223:225627.204 proxy #102 started [availability manager #1]
    1051375:20220223:225627.235 cannot send heartbeat message to server at "zabbix.domain.com": connection is not allowed
    1051376:20220223:225628.129 cannot send proxy data to server at "zabbix.domain.com": connection is not allowed
    1051376:20220223:225629.152 cannot send proxy data to server at "zabbix.domain.com": connection is not allowed
    1051376:20220223:225630.171 cannot send proxy data to server at "zabbix.domain.com": connection is not allowed

    My haproxy.conf configuration.

    Code:
    frontend http
    mode tcp
    bind *:80
    default_backend http_back
    
    frontend https
    mode tcp
    bind *:443
    default_backend https_back
    
    frontend zabix
    mode tcp
    bind *:10051
    default_backend zabbix_back
    
    frontend kubernetes
    mode tcp
    bind *:6443
    option tcplog
    default_backend kubernetes-master-nodes
    
    backend kubernetes-master-nodes
    mode tcp
    balance roundrobin
    option tcp-check
    server master-0 10.10.10.111:6443 check fall 3 rise 2
    
    backend http_back
    mode tcp
    option log-health-checks
    default-server inter 10s fall 2
    server worker-0 10.10.10.112:80 send-proxy check
    server worker-1 10.10.10.113:80 send-proxy check
    server worker-2 10.10.10.114:80 send-proxy check
    
    backend https_back
    mode tcp
    option tcp-check
    option log-health-checks
    default-server inter 10s fall 2
    server worker-0 10.10.10.112:443 send-proxy check
    server worker-1 10.10.10.113:443 send-proxy check
    server worker-2 10.10.10.114:443 send-proxy check
    
    backend zabbix_back
    mode tcp
    option tcp-check
    option log-health-checks
    default-server inter 10s fall 2
    server worker-0 10.10.10.112:10051 send-proxy check
    server worker-1 10.10.10.113:10051 send-proxy check
    server worker-2 10.10.10.114:10051 send-proxy check

    Can someone help? Or have any idea?
    Last edited by joao.medeiros; 24-02-2022, 16:20.
Working...