Ad Widget

Collapse

Remote commands on active agent

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kyus
    Senior Member
    • Feb 2024
    • 172

    #1

    Remote commands on active agent

    Hello everyone!

    So, i've read about the possibility of executing remote commands on zabbix active agent 7.x.x and i went to try it out, but i must be missing something, because i'm getting the error "cannot find host AGENT interface". Is there something else that i should do? I'm not suposed to add an interface since I'm using active checks, right?
  • Answer selected by kyus at 09-01-2025, 21:05.
    kyus
    Senior Member
    • Feb 2024
    • 172

    Hey! Just to close this thread, this issue was fixed with the release of Zabbix 7.0.4.

    Comment

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

      #2
      I suppose, if you want to use those commands, you need to add the interface.... As long as see, command is still initiated by server, but to be executed somewhere, it needs to know where... if you do not have any interfaces, it has no knowledge, where to turn and where to execute it..
      (I have not read any v7 docs, just assuming ...)

      Saying " I'm not suposed to add an interface since I'm using active checks" is not really correct. Using active agent does not mean, that you do not define interfaces. Yes, for monitoring purposes it might not be needed, but now we have case, where it is needed, for example...​
      Last edited by cyber; 06-02-2024, 09:25.

      Comment

      • kyus
        Senior Member
        • Feb 2024
        • 172

        #3
        Hey cyber, thanks for your response. I thought that it wouldn't be needed to add an interface because of this line in the What's new doc:

        "It is now possible to execute remote commands on a version 7.0 agent that is operating in active mode. Once the execution of a remote command is triggered by an action operation or manual script execution, the command will be included in the active checks configuration and executed once the active agent receives it. Note that older active agents will ignore any remote commands included in the active checks configuration. For more information, see Passive and active agent checks.​"

        If i understood it correctly, the server wouldn't initiate the command, but i might have missed something.

        I was testing it out to see if it could be possible to use remote commands in agents which the server isn't allowed to connect to.

        Comment

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

          #4
          ok .. as I said, I have not read v7 docs, I was just assuming.. I guess I understand how the mechanics there work now, as you quoted some... the command is placed into "agent config" and next time agent asks for updates, it receives it and should execute it once... So yea.. by that description interface info should not be required... But it is beta version .. it might aswell have bugs in it..

          Comment

          • kyus
            Senior Member
            • Feb 2024
            • 172

            #5
            Ok, thanks anyway, since i'm relatively new to zabbix i just wanted to make sure i wasn't making any obvious mistake . Since it isn't anything that i really need right now I'm just gonna wait and try it again some other time.

            Comment

            • Einkill
              Junior Member
              • Jun 2017
              • 5

              #6
              With a Zabbix 7.0 release have you any update on remote commands on active agent?

              Comment

              • zhucc
                Junior Member
                • Jun 2024
                • 4

                #7
                I've tried every configuration I know of and still can't successfully execute remote commands after Trigger actions via active proxy.

                Comment

                • kyus
                  Senior Member
                  • Feb 2024
                  • 172

                  #8
                  Just tested it out again and i'm still getting the same error: "cannot find host AGENT interface".

                  Comment

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

                    #9
                    Originally posted by kyus
                    Just tested it out again and i'm still getting the same error: "cannot find host AGENT interface".
                    So, how is your host interface configured in Zabbix?

                    Markku

                    Comment

                    • MRedbourne
                      Senior Member
                      • Feb 2023
                      • 103

                      #10
                      Hey Folks,

                      Anyone have any update on this? We recently moved to the 7.0 LTS stream into a fully active deployment. We also can't get command execution to work on active agents, and we couldn't get it to work when we had a hybrid deployment (active items, passive scripts). Am I missing a bug report or something from Zabbix?

                      Agents and Zabbix server are all on the 7.0 stream (7.0.0 Agent2 + 7.0.0 server).

                      Comment

                      • zhucc
                        Junior Member
                        • Jun 2024
                        • 4

                        #11
                        Today I used version 6.4 for testing. And successfully execute the remote command after triggering the operation in the active proxy environment.

                        Comment

                        • MRedbourne
                          Senior Member
                          • Feb 2023
                          • 103

                          #12
                          Originally posted by zhucc
                          Today I used version 6.4 for testing. And successfully execute the remote command after triggering the operation in the active proxy environment.
                          That's not what we're talking about here, even if what you're describing was possible. Zabbix 6.4 doesn't support ZBX_ACTIVE command execution, at all. Per documentation, support for it was released in 7.0.

                          Also, we're discussing Zabbix 7.0, not 6.4

                          Comment

                          • MRedbourne
                            Senior Member
                            • Feb 2023
                            • 103

                            #13
                            I've done a bit more poking around on ym hosts. Seems like Zabbix Agent 2 (7.0.0 from zabbix-release-3) is still set to use communication protocol 6.4.0. The Agent screenshot below is from another monitored host. The server screenshot is from the active server.

                            Click image for larger version

Name:	image.png
Views:	899
Size:	15.5 KB
ID:	486925

                            Click image for larger version

Name:	image.png
Views:	856
Size:	38.3 KB
ID:	486926
                            Having read this documentation > 2 Passive and active agent checks (zabbix.com)​, leads me to believe that active command execution should be supported.

                            "Remote commands to execute. Included if remote command execution has been triggered by an action operation or manual script execution. Note that remote command execution on an active agent is supported since Zabbix agent 7.0. Older active agents will ignore any remote commands included in the active checks server response.​"​

                            Has anyone else had issues with the Zabbix communication protocol not changing from 6.4 to 7.0 in an agent upgrade? Any idea how to get it to change?

                            Comment

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

                              #14
                              Note that plugin communication protocol is different from the agent communication protocol.



                              When the agent says that it is version 7.0.x, it uses the agent protocols defined in the 7.0 documentation.

                              Markku

                              Comment

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

                                #15
                                But about the original problem (remote commands execution), there are now a few posts here about problems in 7.0 (in agent or in proxy), so please someone using the feature, make a minimum reproducable configuration and open an issue in Zabbix support portal.

                                Markku

                                Comment

                                Working...