Ad Widget

Collapse

Zabbix 2.0 Proxy & Remote Commands

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maddog2050
    Junior Member
    • Aug 2010
    • 14

    #1

    Zabbix 2.0 Proxy & Remote Commands

    Hi,

    Does anyone know if the new zabbix 2.0 proxy sends the remote commands to the zabbix agent rather than the zabbix server?

    Thanks in advance

    Adam
  • GArmao
    Zabbix Certified Specialist
    Zabbix Certified Trainer
    Zabbix Certified Specialist
    • Mar 2010
    • 135

    #2
    it seems it still is a missing feature: https://support.zabbix.com/browse/ZBXNEXT-936

    however user executable scripts can now be run from the zabbix server or the zabbix proxy, but that's not what you need...

    from: http://www.zabbix.com/documentation/...on/whatsnew200

    Ability to execute scripts on Zabbix agent

    Before Zabbix 2.0, user scripts could be executed on the Zabbix server only. Starting with 2.0, a script can be configured to be executed on the agent instead. For this feature to work, agent must be configured to allow remote commands.

    Comment

    • cscott
      Junior Member
      • Jul 2012
      • 16

      #3
      I to need this functionality, it seems not to be able to do it via a proxy it totally at odds with the architecture design and thus this should be considered a fault rather than a new feature

      Comment

      • jhenry
        Junior Member
        • Jul 2013
        • 11

        #4
        Related question... if a host is monitored through a Zabbix proxy, but the master server CAN also reach the agent (there's no firewall or routing issues blocking the connection), can remote commands be used with that host? It's not clear from the docs.

        We're designing a Zabbix architecture for a fairly large network (thousands of devices) and we'd like to use proxies to take load off the master even though, access-wise, the master will be able to talk to every agent device. But if doing so rules out using remote commands, we might reevaluate that decision.

        Comment

        • heaje
          Senior Member
          Zabbix Certified Specialist
          • Sep 2009
          • 325

          #5
          Assuming the agents are configured to allow the server to connect to them and the agents have remote commands enabled, then yes, the server should be able to run commands on them just fine.

          Comment

          • daniel.lin
            Junior Member
            • Jan 2013
            • 5

            #6
            It will be so useful to have that feature on proxy

            Comment

            • tttodorov
              Junior Member
              • Oct 2012
              • 6

              #7
              zabbix_get.py - proxy aware zabbix_get

              As this topic is commented for a long time here and on other zabbix forums, I would like to add my 5 cents. Here is my proposed workaround:
              I scripted a zabbix_get.py script, which is a "proxy aware zabbix_get". We are using it in "zabbix scripts" and it could be used to start a remote command by zabbix key 'system.run["command -to -run","wait"]'. Here is the detailed info:

              # ABOUT
              # The script is a 'zabbix_get' command, which is proxy aware.
              # "Proxy Aware" means you can start zabbix_get.py on the zabbix server and take output of an agent key
              # on a zabbix host, which is behind a proxy.
              # Tested on Zabbix 2.0
              #
              # USAGE
              # ./zabbix_get.py <zabbix_host_name> <zabbix_agent_key>
              # <zabbix_host_name> is the host name configured in the zabbix web interface
              # Note: This is the {HOST.HOST1} zabbix macro.
              # <zabbix_agent_key> is the agent key, as used in -k option of the original zabbix_get
              # Note: The agent key should be properly quoted as used in the -k option of zabbix_get, e.g:
              # 'system.run["echo \"###\"","wait"] is working normally on zabbix_get and zabbix_get.py
              #
              # OPERATION
              # The script first connects to the zabbix server API and takes the proxy configuration for the given host.
              # If host is not behind a proxy, the script invokes the original zabbix_get directly from the zabbix server.
              # If host is behind a proxy, the script invokes the original zabbix_get on the proxy.
              #
              # CONFIGURATION
              # * You need to configure the zabbix API user and password below
              # * In the zabbix proxy configuration file 'zabbix_agentd.conf' enable remote commands "EnableRemoteCommands=1"
              # * In the zabbix proxy configuration file 'zabbix_agentd.conf' set timeout to maximum "Timeout=30"
              #

              Cheers,
              Todor
              Attached Files

              Comment

              • Stak
                Junior Member
                • Mar 2015
                • 10

                #8
                I use remote commands with proxy for SNMP set and ping test. In my topology there are no access from Zabbix server to some subnets, only proxy access available.

                I use scripts like this:

                Ping (proxy) Script Server /usr/bin/zabbix_get -s{$PROXY_IP} -p10050 -k"system.run[/bin/ping -c 3 {HOST.CONN} 2>&1]"

                Comment

                Working...