Ad Widget

Collapse

Strange system.run...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mma
    Member
    • Apr 2010
    • 39

    #1

    Strange system.run...

    Hi everybody !

    Today I create my owns bash scripts to monitoring Linux.
    When I put :
    Code:
    UserParameter=net.interfacesoff,((ifconfig -a |grep Link )| egrep -v -e "$(ifconfig | grep Link | cut -d' ' -f1| tr '\n' '|' | sed 's/.\{1\}$//g')") | cut -d' ' -f1 | tr '\n' ' '
    in my zabbix_agentd.conf, it works
    But I prefer create an item like
    Code:
    system.run[((ifconfig -a |grep Link )| egrep -v -e \"$(ifconfig | grep Link | cut -d' ' -f1| tr '\n' '|' | sed 's/.\{1\}$//g')\") | cut -d' ' -f1 | tr '\n' ' ']
    to simplify the deployment (the good word ...?)
    Exactly the same code, but it doesn't work on the server :
    Code:
    27820:20100415:163037.505 Item [Zabbix Server:system.run[((ifconfig -a |grep Link )| egrep -v -e \"$(ifconfig | grep Link | cut -d' ' -f1| tr '\n' '|' | sed 's/.\{1\}$//g')\") | cut -d' ' -f1 | tr '\n' ' ']] error: Not supported by Zabbix Agent
    Anyone can help me ?

    PS : I think Zabbix doesn't like my quotes or something else...
    Same think without spaces between "|"
    PS 2 : Just a stupid error, my server is the only "host" with RemoteCommand not configured...
    Sorry...
    Last edited by mma; 15-04-2010, 16:40. Reason: title not adapted
Working...