Ad Widget

Collapse

Multiple configurations under /etc/zabbix/zabbix_agent2.d

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yurtesen
    Senior Member
    • Aug 2008
    • 130

    #1

    Multiple configurations under /etc/zabbix/zabbix_agent2.d

    As far as I can tell. When there are multiple files under `/etc/zabbix/zabbix_agent2.d` they are applied alphabetically and if there are same configuration keys, the last one overrides the previous settings. Is this understanding correct?

    So it is hard for having two separate configurations for two separate Zabbix servers monitoring the same agent with different configurations. Some of the configuration values must be shared. Is this correct?
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    I don't have my config hande, but doesn't the agent2 conf file have Include=/etc/zabbix/zabbix_agent2.d? If so, your second config could have .../zabbix_agent2.d2

    Comment

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

      #3
      Yes, your understanding is correct.

      If you are using multiple instances of agent, pointing to different server, you really should separate their configs. Just to avoid any mess.
      But ... If they have to be in same directory.... for an "Include" parameter in conf, you can specify a bit more than just a directory there. Maybe have .aconf and .bconf.. one loads only with a and other with b?
      Include no You may include individual files or all files in a directory in the configuration file.
      To only include relevant files in the specified directory, the asterisk wildcard character is supported for pattern matching. For example: /absolute/path/to/config/files/*.conf.

      Comment

      • yurtesen
        Senior Member
        • Aug 2008
        • 130

        #4
        cyber Actually my question was other way around,. I would like to use same instance of agent serving 2 different servers. I guess for passive agent monitoring perhaps it is enough to set `Server` setting to include IPs of different servers.
        But I wonder how would it work with `ServerActive` is Zabbix agent able to keep different item lists for different remote hosts listed in `ServerActive`?

        Comment

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

          #5
          Docs say, you can use multiple zabbix instances in ServerActive parameter
          ServerActive no IP: Port (or hostname: port) of Zabbix server or Zabbix proxy for active checks.
          Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed.
          If port is not specified, default port is used.
          IPv6 addresses must be enclosed in square brackets if port for that host is specified.
          If port is not specified, square brackets for IPv6 addresses are optional.
          If this parameter is not specified, active checks are disabled.
          I am pretty sure, if its in docs, it will work..

          Comment

          Working...