Ad Widget

Collapse

"EnableRemoteCommands=1" doesn't work on Zabbix Agent 2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wpagane
    Member
    • Apr 2021
    • 31

    #1

    "EnableRemoteCommands=1" doesn't work on Zabbix Agent 2

    Hello,

    I've worked to insert the parameter "EnableRemoteCommands=1" in the "zabbix_agent.conf" file for "Zabbix Agent" and it works perfectly! It allows me to execute automatically remote commands once an item is triggerd (i.e.: Start a Windows Service if it stops).

    However, looking at the "zabbix_agent.conf" file for "Zabbix Agent 2" I cannot find the paragraph related to "EnableRemoteCommands". And, even if I try to add the line "EnableRemoteCommands=1" in anywhere I get the error message:

    Error: Windows could not start the Zabbix Agent 2 service on Local Computer. Error 1053: The service did not respond to the start or control request in timely fashion.

    isn't this parameter compatible with Agent version 2?

    Source: Zabbix 5.2

    Thanks a lot!
  • wpagane
    Member
    • Apr 2021
    • 31

    #2
    Hi cyber ,
    On the documentation (https://www.zabbix.com/documentation...estrict_checks) I saw: "unsupported by Zabbix agent2"

    In my case, I use Zabbix Agent2 (because I need to monitor HTTPS Protocol on IIS Server, which isn't supported by Zabbix Agent 1).

    Under "zabbix_agent2.conf" file I've added a line: "AllowKey=system.run[*]", as per documentation, while using "system.run[*]" it doesn't require to add a "DenyKey" parameter.
    Even adding this line, Zabbix was not able to "ACTION" and execute a Remote Command (It works for me while I'm using Zabbix Agent 1, but, on Zabbix Agent 1 I added a line in the config file called EnableRemoteCommand=1, but Zabbix Agent2 doesn't allow me to do that, it gives an error when I try to start the Zabbix Service on the Server).

    Any ideas? Or this is really unsupported?
    If SO, I'll have to make a decision:

    [Zabbix Agent1] 1. Monitor Windows Services, AND "ACTION" on them executing Remote Commands to "start" them, in case offline, AND do NOT monitor HTTPS Protocols on IIS Server
    or
    [Zabbix Agent2] 2. Monitor Windows Services, AND do NOT "ACTION "on them executing Remote Commands to "start" them, in case offline, AND monitor HTTPS Protocols on IIS Server

    Thank you very much.
    Last edited by wpagane; 14-07-2021, 15:26.

    Comment

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

      #3
      yes... you should solve this with AllowKey and DenyKey parameters.

      Note that:
      • All system.run
      • items (remote commands, scripts) are disabled by default, even when no deny keys are specified;
      • Since Zabbix 5.0.2 the EnableRemoteCommands agent parameter is:
        • deprecated by Zabbix agent
        • unsupported by Zabbix agent2

      Comment

      • beanywilson
        Junior Member
        • Jun 2023
        • 6

        #4
        Agent Version - 6.4.3 on Ubuntu 22.04



        /etc/zabbix/zabbix_agent2.conf contains

        AllowKey=system.run[*]
        Plugins.SystemRun.LogRemoteCommands=1

        Via a 6.4.3 proxy on Ubuntu Linux

        All Green and Data flowing



        Click image for larger version

Name:	image.png
Views:	5731
Size:	16.3 KB
ID:	466135



        Still, Get the following results from Detect Operating System.

        Click image for larger version

Name:	image.png
Views:	5764
Size:	15.8 KB
ID:	466134

        Comment

        • ezoltan
          Junior Member
          • Feb 2024
          • 24

          #5
          Did you find a solution? I am on Zabbix 7.4 with matching Agent 2 and getting the same error, even though I have AllowKey enabled.
          Anyone? Please?

          Comment

          Working...