zabbix auto-registration in kbernetes

by Yi Yang   Last Updated January 03, 2018 09:00 AM

I have a problem on zabbix in kubernetes.

I write a zabbix chart and install in a k8s environment on multi nodes. images(zabbix-web\zabbix-server\zabbix-agent) ars from docker.io/zabbix. zabbix-server on control plane as deployment, and zabbix-agent on compute as daemonset.

    #kubectl get po -n openstack -a -o wide | grep zabbix
    zabbix-agent-compute-4m7bn                   1/1       Running            0          3h        10.50.0.6       node-1
    zabbix-agent-compute-wkl8m                   1/1       Running            0          3h        10.50.0.10      node-8
    zabbix-agent-compute-wwtdw                   1/1       Running            0          3h        10.50.0.5       node-4
    zabbix-agent-control-87m8d                   1/1       Running            0          3h        10.50.0.9       node-6
    zabbix-agent-control-gkmqf                   1/1       Running            0          3h        10.50.0.130     node-3
    zabbix-agent-control-plq68                   1/1       Running            0          3h        10.50.0.129     node-2
    zabbix-server-578bd5bcf9-9t7qv               1/1       Running            0          3h        10.233.64.131   node-6
    zabbix-server-578bd5bcf9-q6nsm               1/1       Running            0          3h        10.233.65.82    node-3
    zabbix-server-578bd5bcf9-rtkmz               1/1       Running            0          3h        10.233.69.203   node-2
    zabbix-web-db9b5457f-bg4ff                   1/1       Running            0          3h        10.233.69.206   node-2
    zabbix-web-db9b5457f-nl84k                   1/1       Running            0          3h        10.233.64.132   node-6
    zabbix-web-db9b5457f-t84rd                   1/1       Running            0          3h        10.233.65.83    node-3

    #kubectl get svc -n openstack | grep zabbix
    zabbix-agent                     ClusterIP   10.254.229.253   <none>        10050/TCP             4h
    zabbix-server                    ClusterIP   10.254.245.247   <none>        10051/TCP,10052/TCP   4h
    zabbix-web                       ClusterIP   10.254.50.31     <none>        9009:31112/TCP        4h

    #cat /etc/hosts
    10.50.0.6 node-1.domain.tld node-1.cluster.local node-1
    10.50.0.5 node-4.domain.tld node-4.cluster.local node-4
    10.50.0.10 node-8.domain.tld node-8.cluster.local node-8
    10.50.0.130 node-3.domain.tld node-3.cluster.local node-3
    10.50.0.129 node-2.domain.tld node-2.cluster.local node-2
    10.50.0.9 node-6.domain.tld node-6.cluster.local node-6

And i set a zabbix auto-registration toregistration. But it donot work. zabbix_agentd.conf:

    Server=zabbix-server          # zabbix-server svc name
    ServerActive=zabbix-server    # zabbix-server svc name
    HostnameItem=compute node

agent log:

    6552:20180102:031920.247 active check configuration update from [zabbix-server:10051] started to fail (cannot connect to [[zabbix-server]:10051]: [111] Connection refused)
    6552:20180102:033430.607 active check configuration update from [zabbix-server:10051] is working again
    6552:20180102:033430.607 no active checks on server [zabbix-server:10051]: host [node-6] not found
    6552:20180102:033640.623 active check configuration update from [zabbix-server:10051] started to fail (ZBX_TCP_READ() timed out)
    6552:20180102:035410.812 active check configuration update from [zabbix-server:10051] is working again
    6552:20180102:035410.812 no active checks on server [zabbix-server:10051]: host [node-6] not found
    6552:20180102:035620.831 active check configuration update from [zabbix-server:10051] started to fail (ZBX_TCP_READ() timed out)

server log:

    126:20180102:065042.068 cannot send list of active checks to "172.50.10.5": host [node-3] not found      # 172.50.10.5 external address
    129:20180102:065136.517 cannot send list of active checks to "172.50.10.7": host [node-8] not found
    128:20180102:065216.699 cannot send list of active checks to "10.233.69.1": host [node-2] not found
    125:20180102:065247.288 cannot send list of active checks to "172.50.10.3": host [node-1] not found
    125:20180102:065336.617 cannot send list of active checks to "172.50.10.6": host [node-6] not found
    126:20180102:065355.454 cannot send list of active checks to "172.50.10.8": host [node-4] not found

The zabbix web has no hosts appearing. Where is wrong?



Related Questions




Cannot login on Zabbix docker installation

Updated June 13, 2017 15:00 PM