Ad Widget

Collapse

ZABBIX, Awk, and Fstat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tid008
    Junior Member
    • Mar 2009
    • 5

    #1

    ZABBIX, Awk, and Fstat

    Hi,

    I have a problem using .bat throw userparameters within zabbix.

    My script .bat is launching a Awk script witch parse a file and send the result into the File X.txt

    If i launch my .bat direectly from my Windows server , there is no problem the X.txt is correct.

    But , my problem is that if i Launch this .bat from my user parameter.
    The begining of the X.txt is always
    fstat < 0: fd = 0

    It seem to me that i have to desctivate the " ECHO" into my Awk file , but is it realy the problem.

    Any Help would be fantastic.

    Cordialy
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    It is very likely that you use $1, $2, ... ,$N macros in the awk script. Zabbix will automatically substitute them.

    Consider replacing $1 by $ 1, $2 by $ 2, etc. The macros will perfectly work with awk.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...