Ad Widget

Collapse

Remote command on current host is OK in Reports>ActionLog but action is not triggered

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gerard-wl
    Junior Member
    • Sep 2015
    • 24

    #1

    Remote command on current host is OK in Reports>ActionLog but action is not triggered

    Version is zabbix 4.4.1 on this single server, with one proxy
    I had an auto-regitration action ( Configuration>Actions) with just a condition on proxy name
    Operation details :
    operation type=remode command
    target=Current host
    type=Custom script
    Execute on=Zabbix server
    Commands=/usr/local/zabbix/testUnknownHost/test1.sh

    In Reports>Action log I can see (with 2' period) :
    Command: Executed (in green)
    Zabbix server:/usr/local/zabbix/testUnknownHost/test1.sh

    I've set the debug mode in server's log, and yes all is ok :

    21080:20200420:102745.031 In zbx_script_prepare()
    21080:20200420:102745.031 End of zbx_script_prepare():SUCCEED
    21080:20200420:102745.031 In zbx_script_execute()
    21080:20200420:102745.031 In zbx_popen() command:'/usr/local/zabbix/testUnknownHost/test1.sh'
    21080:20200420:102745.032 End of zbx_popen():7
    21748:20200420:102745.032 zbx_popen(): executing script
    21080:20200420:102745.037 In zbx_waitpid()
    21080:20200420:102745.037 zbx_waitpid() exited, status:0
    21080:20200420:102745.037 End of zbx_waitpid():21748
    21080:20200420:102745.037 End of zbx_script_execute():SUCCEED


    BUT I can't understand something .. the script is :

    #!/bin/sh
    touch /tmp/abc
    echo === $* === > /tmp/abc.log


    And even if zabbix uses popen or redirections, /tmp/abc and /tmp/abc.log should be created, but they are not, but why ?
    Last edited by gerard-wl; 20-04-2020, 14:18.
  • gerard-wl
    Junior Member
    • Sep 2015
    • 24

    #2
    empty post - don't care
    Last edited by gerard-wl; 20-04-2020, 14:24.

    Comment

    Working...