Ad Widget

Collapse

system.run

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ehermouet
    Member
    • May 2011
    • 50

    #1

    system.run

    Hi all

    i want to execute script when trigger is up.

    my action is system.run[C:\test\txt.bat,nowait]
    my zabbix agent config is

    Server=192.168.1.26
    Hostname=spbdd2
    ServerActive=192.168.1.26
    UserParameter=windows.services,"C:\services.exe"
    #system discovery
    UserParameter = system.discovery[*],cscript "C:\zabbix_win_system_discovery.vbs" //Nologo "$1"
    #process
    UserParameter = process[*],cscript "C:\zabbix_win_process.vbs" //Nologo "$1" "$2"
    #eventlog query
    UserParameter = eventlog.query[*],cscript "C:\zabbix_win_eventlog.vbs" //Nologo "$1" "$2"
    # allow weird chars in userparameters arguments
    UnsafeUserParameters=1
    EnableRemoteCommands=1
    DebugLevel=3
    LogFile=c:\zabbix_agentd.log
    LogRemoteCommands=1
    StartAgents=5
    Timeout=30

    so script is executed because on log i see that
    5500:20130206:152539.650 Executing command 'system.run[C:\test\txt.bat,nowait]'

    but nothing append. My script just write txt file. if i launch my script it works.

    it's on windows domain, my script is readable for everybody


    tks for your help
  • ehermouet
    Member
    • May 2011
    • 50

    #2
    I found why

    you must remove system.run[] and just write the path of file

    C:\test\txt.bat,nowait

    Comment

    Working...