Ad Widget

Collapse

Remote commands via proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #1

    Remote commands via proxy

    I seem to remember in the past where action remote commands could be sent via the proxy to the host instead of only from the server. I can't seem to find anything on the subject. I see "EnableRemoteCommands is an option in the proxy config, but I don't really see what it allows.

    Is it possible to have an action remote command sent via the proxy?

    Thanks
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    I believe you mean this (after Create script button):

    Click image for larger version  Name:	image.png Views:	0 Size:	40.7 KB ID:	455156

    Markku

    Comment

    • LenR
      Senior Member
      • Sep 2009
      • 1005

      #3
      Not exactly, wouldn't that run a script on the proxy related to the action's host? What I remember would route the remote command to the host via the proxy, for cases when the server can't get there due to network restrictions.

      I guess the script on the proxy could do zabbix_get -s {HOST.HOST} -k system.run[some_script] but that is convoluted.

      Thanks

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        Isn't "Execute on: Zabbix agent" then the correct option in the script configuration?

        Markku

        Comment

        • LenR
          Senior Member
          • Sep 2009
          • 1005

          #5
          Originally posted by Markku
          Isn't "Execute on: Zabbix agent" then the correct option in the script configuration?

          Markku
          Yes, but the zabbix server must be able to send the command to port 10050 of the agent. For some proxy-monitored hosts, it can't, but the proxy could.

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1781

            #6
            Oh, ok, I thought it is the managing component (proxy) that sends the command to the agent.

            Markku

            Comment

            • LenR
              Senior Member
              • Sep 2009
              • 1005

              #7
              It was originally, but that's the hole in my memory, I thought they HAD setup some way to route commands via the proxy, but I can't find it in the doc. Unless now ALL commands go via the proxy.

              Comment

              • Markku
                Senior Member
                Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                • Sep 2018
                • 1781

                #8
                An active proxy checks in to the server every second (!) just to find out if there are any tasks to execute, so I wonder how that all really works now.

                Markku

                Comment

                • LenR
                  Senior Member
                  • Sep 2009
                  • 1005

                  #9
                  It may be really old.... https://www.zabbix.com/documentation...hrough-proxies

                  I think all remote commands marked "Zabbix Agent" are routed via the proxy for proxy-monitored hosts.

                  Comment

                  Working...