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

Enabling remote commands on Zabbix agent is very hard and misleading

XMLWordPrintable

    • Sprint 64 (May 2020)
    • 0.5

      Take clean zabbix_agentd.conf, and read documentation that EnableRemoteCommands is deprecated

      This parameter is deprecated, use AllowKey=system.run[*] or DenyKey=system.run[*] instead.

      Add:

      AllowKey=system.run[*]
      

      See warning
      zabbix_agentd [141208]: Warning: key access rule "system.run[*]" conflicts with another rule defined above
      Test if it works:

      zabbix_get -s 127.0.0.1 -k "system.run[echo 2]"
      ZBX_NOTSUPPORTED: Unsupported item key.
      

      For some reason it says unsupported item key but made sure that key is correct so it is not allowed

      Try deleting DenyKey
      See error:

      zabbix_agentd [141243]: ERROR: "AllowKey" without "DenyKey" rules are meaningless
      

      What can be done to enable remote command ? Documentation states simply

      use AllowKey=system.run[*] or DenyKey=system.run[*]
      

      So it looks like we need to add at least something to DenyKey ?
      Add:

      DenyKey=test

      See:

      zabbix_get -s 127.0.0.1 -k "system.run[echo 2]"
      ZBX_NOTSUPPORTED: Remote commands are not enabled.
      

      Still not working, how to enable remote commands there is only one option to do that but it is deprecated.
      OK, try to use nevertheless

      EnableRemoteCommands=1
      

      See warning

      Warning: EnableRemoteCommands parameter is deprecated, use AllowKey=system.run[*] or DenyKey=system.run[*] instead
      

      But got it working

      ./bin/zabbix_get -s 127.0.0.1 -k "system.run[echo 2]"
      2
      

      Expected:
      Documentation and logs must not be so misleading and it must not be so hard to enable remote commands and it must be possible to enable remote commands without deprecated option, please provide example at least.

            wiper Andris Zeila
            vso Vladislavs Sokurenko
            Team A
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: