Ad Widget

Collapse

Remote commands to host monitored by zabbix proxy 5.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svalencia
    Junior Member
    • Jun 2020
    • 11

    #1

    Remote commands to host monitored by zabbix proxy 5.0

    I am unable to execute a script to a host monitored by a proxy, when creating the script and choosing the option to execute in proxy, the command is executed in the proxy but not in the host that I want. the script is simple sudo / usr / bin / systemctl status sshd

    thanks.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Execute on Execute a custom script on:
    Zabbix agent - the script will be executed by Zabbix agent on the host
    Zabbix server (proxy) - the script will be executed by Zabbix server or proxy - depending on whether the host is monitored by server or proxy

    Zabbix server - the script will be executed by Zabbix server only
    To execute scripts on the agent, system.run items must be allowed.
    To execute scripts on proxy, it must be configured (EnableRemoteCommands parameter enabled) to allow remote commands from the server.
    This field is available if 'Custom script' is selected as Type
    It is obvious that if you select "run on proxy" then there and run! :-)

    Comment

    • svalencia
      Junior Member
      • Jun 2020
      • 11

      #3
      Ok, what I don't understand is the following:
      I have the following script / usr / bin / systemctl status sshd and this I can execute perfectly on a server connected directly to a zabbix server, however if I do the same with a server behind a proxy, send the following error:

      Unsupported item key.
      Cannot execute script

      sudo / usr / bin / systemctl status sshd

      thanks.

      Comment

      • svalencia
        Junior Member
        • Jun 2020
        • 11

        #4
        thank you very much I was able to solve it, I had to comment
        #DenyKey = system.run[*]

        Comment

        Working...