Ad Widget

Collapse

Multiple hosts with single zabbix agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • philthynz
    Junior Member
    • Jun 2016
    • 27

    #1

    Multiple hosts with single zabbix agent

    Hi Everyone,

    Can the zabbix agent active checks on a single agent also do the checks for multiple hosts? Like having multiple hosts from one agent? I tried adding multiple hosts in Hostname= in the agent config file. But it won't accept that. I wouldn't want to have an agent for every host if that can be avoided. The environment is a hosted zabbix server and the agents in lxc containers that collect snmp etc...
  • salai
    Junior Member
    • Nov 2020
    • 27

    #2
    Did you find out the answers for this question?

    Comment

    • gofree
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2017
      • 400

      #3
      Hostname= for active checks is kinda identification ( or pairing the zabbix agent installed on a particular system ) of the zabbix agent on OS and host created in the frontend ( eg databased ). So simple answer is no, what you trying to achieve will not work and its kinda impossible to work ( how should the agent connect to other hosts just by specifying their name, its not build like this ).

      What you can do especially if youre interested in snmp is collect those metrics from zabbix proxy ( single point ) and poll ( passive checking ) hosts ( defined in frontend eg. zabbix db ).

      Comment

      • Nel23FX
        Junior Member
        • Feb 2021
        • 10

        #4
        Check your host with SNMP so instead of ZabbixAgent to avoid installing agent on each hosts.

        Zabbix Agent is a clientside programm. So by definition one Agent = one Host.

        It's curious to want an agent for multiple machine. But think an host can have multiple hostname (localhost, machine, machine.domain, host.workgroup)

        Am I right?
        Last edited by Nel23FX; 26-02-2021, 12:00.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4806

          #5
          As this thread was created, there was no such option... but with 5.2 you can have multiple hostnames in agent config. I think it even does autoregistration for multiple hosts, if those are described there and you have autoreg actions in place.
          Hostname no Set by HostnameItem List of comma-delimited unique, case-sensitive hostnames.
          Required for active checks and must match hostnames as configured on the server. Value is acquired from HostnameItem if undefined.
          Allowed characters: alphanumeric, '.', ' ', '_' and '-'.
          Maximum length: 128 characters per hostname, 2048 characters for the entire line.

          Comment

          • Brain2000
            Junior Member
            • Aug 2024
            • 16

            #6
            It would be really cool if the Zabbix agent could have a "cluster" mode, where it would enumerate the IP addresses every so often and query the Zabbix server for entries that matched. That way a cluster could fail over and Zabbix Agent Active tests would be able to follow the virtual host around.

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4806

              #7
              Originally posted by Brain2000
              It would be really cool if the Zabbix agent could have a "cluster" mode, where it would enumerate the IP addresses every so often and query the Zabbix server for entries that matched. That way a cluster could fail over and Zabbix Agent Active tests would be able to follow the virtual host around.
              You should be able to tie agent as a resource to a cluster, so it will be started up together with your other cluster resources (including that virtual ip), and then it will be started always in the same host where your cluster resource currently is...

              Comment

              • Brain2000
                Junior Member
                • Aug 2024
                • 16

                #8
                Originally posted by cyber
                You should be able to tie agent as a resource to a cluster, so it will be started up together with your other cluster resources (including that virtual ip), and then it will be started always in the same host where your cluster resource currently is...
                How many agents can you run simultaneously?

                Comment

                • cyber
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2006
                  • 4806

                  #9
                  Originally posted by Brain2000

                  How many agents can you run simultaneously?
                  how many you need? point is to run them on different ports.. So keep your local agent at default 10050 and start up another at 11050, for example, and third on 12050 etc... each of them needs their own config file.

                  Comment

                  • Brain2000
                    Junior Member
                    • Aug 2024
                    • 16

                    #10
                    Originally posted by cyber

                    how many you need? point is to run them on different ports.. So keep your local agent at default 10050 and start up another at 11050, for example, and third on 12050 etc... each of them needs their own config file.
                    I would use one per set of cluster resources so they could be started/stopped/moved between nodes. For example, I have one cluster with four SQL instances that can move independently from each other, so in that case it would need 5 agents (one for each SQL instance and one for the node itself).

                    Sounds like that is a feasible direction to go.
                    Last edited by Brain2000; 04-09-2024, 18:36.

                    Comment

                    Working...