Ad Widget

Collapse

Manually run a script on Zabbix 2.0.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fiphi
    Junior Member
    • Apr 2018
    • 1

    #1

    Manually run a script on Zabbix 2.0.4

    Hello everybody,
    I just try to execute a script, already define in the "Administration => Scripts", but I can't.
    Is there a way to launch such script via the Zabbix web interface ?
    OK I can launch it on the server side via ssh session, but my point is, for an operator point of view, just click to some script(s) and check again the status in Zabbix (stop/start/reload/etc.. of a service for sample).
    Thx for your prompt comments...

    Bye.
  • aigars.kadikis
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2018
    • 208

    #2
    Hi, fiphi!

    I am afraid there is no such a feature this time.
    The best thing to do before moving script to the life (in zabbix frontend) is to test it in under 'zabbix' users environment.

    If your script does not have any arguments then I would suggest to move under 'zabbix' users skin with:
    Code:
    su -s /bin/bash zabbix
    Code:
    touch test.sh
    chmod +x test.sh
    Put your script inside 'test.sh' file

    Execute:
    Code:
    ./test.sh
    Exit zabbix user:
    Code:
    exit
    Regards,

    Comment

    Working...