Ad Widget

Collapse

Cannot get remote script to run with zabbix 3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Carl Fortin
    Junior Member
    • Oct 2016
    • 9

    #1

    Cannot get remote script to run with zabbix 3

    I cannot get a remote script to run on agent with zabbix 3.
    I did the following:
    I have added this line to the agent config file:
    EnableRemoteCommands=1

    I have added this line with visudo on the host running the agent:

    zabbix ALL=NOPASSWD: ALL



    Here is the confirmation from zabbix:



    What am missing? I know my command work if I execute it directly on the remote linux which is Centos 6 by the way.

    For some reason the file must exist in the directory otherwise the remote command dos not create it like the command in the console would.
    It's working now.
    Last edited by Carl Fortin; 16-11-2016, 19:25. Reason: SOLVED I have a confirmation from zabix
  • Carl Fortin
    Junior Member
    • Oct 2016
    • 9

    #2
    Solved

    Nevermind, I have just realized that for some reason the file must exist otherwise it will not be created. It's created if running the command in the console but remote command will only work if the file is already in the directory. It overwrite the content.

    Comment

    • Snekovo
      Junior Member
      • Feb 2015
      • 4

      #3
      Add Comment to file

      /etc/sudoers
      #Defaults requiretty


      Sudo by default, it is forbidden to start the process without tty.

      Comment

      Working...