Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21647

Zabbix sender cannot use relative path in zabbix_agent2.conf file

    XMLWordPrintable

Details

    • Problem report
    • Status: Confirmed
    • Major
    • Resolution: Unresolved
    • 6.0.8
    • 7.0 (plan)
    • Agent (G)
    • None
    • Team A
    • Sprint 97 (Feb 2023)

    Description

      Zabbix Agent 2 5.0 - all plugin based stuff is inside the config file.

      Zabbix Agent 2 6.0 - plugin configuration can be put in separate files in conf.d/ folder using include option

      In 6.0 the default parameter for this is set to this relative path:

      Include=./zabbix_agent2.d/plugins.d/*.conf
      

      Under Include parameter definition, there are only absolute paths specified as valid ones:

      # Include=
      # Include=/usr/local/etc/zabbix_agent2.userparams.conf
      # Include=/usr/local/etc/zabbix_agent2.conf.d/
      # Include=/usr/local/etc/zabbix_agent2.conf.d/*.conf
      

      The problem here is if you use the agent configuration file with Zabbix Sender.

      You run sender command from lets say home directory like this:

      zabbix_sender --config /etc/zabbix/zabbix_agent2.conf --key testkey --value testvalue
      

      And then you will get this error:

      zabbix_sender [1751532]: ./zabbix_agent2.d/plugins.d: [2] No such file or directory
      

      This happens because zabbix_sender does not know this relative path.

      I would propose moving the relative directory to an absolute one:

      Include=/etc/zabbbix//zabbix_agent2.d/plugins.d/*.conf
      

      Attachments

        Issue Links

          Activity

            People

              vso Vladislavs Sokurenko
              ksalins Karlis Salins
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: