Ad Widget

Collapse

Host does not connect to zabbix agent 2 without template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markuman
    Junior Member
    • Mar 2023
    • 5

    #1

    Host does not connect to zabbix agent 2 without template

    I've got a strange issue. I am creating hosts using ansible community.zabbix.zabbix_host that works perfectly

    Code:
    - name: configure zabbix hosts
      community.zabbix.zabbix_host:
        host_name: my.host
        interfaces:
          - type: 1
            main: 1
            useip: 0
            dns: my.host.tld
            port: "10050"
        host_groups:
          - Linux servers
        link_templates:
          - Linux by Zabbix agent
        status: enabled
        state: present
        tls_psk_identity: my psk identify
        tls_connect: 2
        tls_accept: 2
        tls_psk: "{{ lookup('onepassword', 'zabbix.agent.psk') }}"
    When I remove the host and recreate it without a template (or just unlink the template) and add just a web scenario to it, the agent won't become available.

    Code:
    - name: configure zabbix hosts
      community.zabbix.zabbix_host:
        host_name: my.host
        interfaces:
          - type: 1
            main: 1
            useip: 0
            dns: my.host.tld
            port: "10050"
        host_groups:
          - Linux servers
        link_templates: []
        status: enabled
        state: present
        tls_psk_identity: my psk identify
        tls_connect: 2
        tls_accept: 2
        tls_psk: "{{ lookup('onepassword', 'zabbix.agent.psk') }}"


    Furthermore, there is no error message. Nor on the client host in /var/log/zabbix/zabbix_agent2.log nor in the server log related to my.host.
    Any ideas what's going wrong?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Why should it show agent availability if you have no items related to agent? Web scenarios are not executed on host, but on server/proxy. They do not need any agent. Server/proxy will never look for an agent, that has no items...
    https://www.zabbix.com/documentation...web_monitoring
    The steps are periodically executed by Zabbix server in a pre-defined order. If a host is monitored by proxy, the steps are executed by the proxy.

    Comment

    Working...