Ad Widget

Collapse

Escaping { character on action box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • angelhc
    Senior Member
    Zabbix Certified Specialist
    • Nov 2009
    • 226

    #1

    Escaping { character on action box

    Hello all!

    We're implementing a new log monitoring wich execute an action when the logical is true.
    The action have to create a .txt file to be parsed on another app, the .txt file have to be created like:
    echo EVENT > $FILENAME
    echo { >> $FILENAME
    echo DOMAIN={$DOMAIN}, >> $FILENAME
    echo APPLICATION=\"AIX\", >> $FILENAME
    echo CREATED={$DATE}, >> $FILENAME
    echo NUMERIC={$NUM} >> $FILENAME
    echo "};" >> $FILENAME

    The $Filename has changed to the real path of the file and is created perfectly but the content of the file only writes the first line (echo LEVEL) ,on the second line a { and the third ones the }.
    I think that the action assumes the { like a beging of a macro and the last one like the finish of it.
    How can we escape this character on the Action box?

    Edit: the real problem is the comma "," at the end of each line... same as before How can we escape this caracter?


    Thanks so much.

    Regards.
    Last edited by angelhc; 16-06-2010, 14:07. Reason: Discover the real problem.
    Number of hosts 1600,Number of items +90k,Number of triggers +22k, Number of users +100, New values per second +1270

    http://zabbixes.wordpress.com/
Working...