Ad Widget

Collapse

How launch a script .sh in a linux server with zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • othin
    Junior Member
    • May 2016
    • 14

    #1

    How launch a script .sh in a linux server with zabbix

    Hi all!!!
    I have a question...i need to launch a script "test.sh" with the agent of zabbix in a linux machine

    Example: test.sh ---> /sbin/poweroff
    (chmod +x done)

    in the /etc/zabbix/zabbix_agentd.conf i have the "EnableRemoteCommands=1"
    The Visudo is edited for the zabbix (i put the line "zabbix ALL=NOPASSWD: ALL")

    But how i can write on the zabbix server "when i see this trigger on, start this script?" and how can i test it?
    In photo as i have modified the "action" on the zabbix-server

    Thanks all
    Attached Files
    Last edited by othin; 03-07-2019, 14:56.
  • Spence572
    Junior Member
    • Jun 2019
    • 3

    #2
    Hi,

    I run shell scripts with Zabbix and I do it as items on hosts, I have it set up like this
    Click image for larger version

Name:	Capture.PNG
Views:	6303
Size:	12.4 KB
ID:	381775

    then I have a trigger based on the output of the script.

    Hope that helps

    Paul

    Comment

    Working...