Ad Widget

Collapse

Custom UserParameters not working properly? (beta4)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KarmaPolice
    Member
    • Oct 2005
    • 95

    #1

    Custom UserParameters not working properly? (beta4)

    Are custom user parameters not working properly?

    I have the following defined:

    Code:
    UserParameter=systemcpuuser[],vmstat 1 2|tail -n1 > /opt/zabbix/temp.cpu;cat /opt/zabbix/temp.cpu|awk '{print $13}'
    UserParameter=systemcpusystem[],cat /opt/zabbix/temp.cpu|awk '{print $14}'
    UserParameter=systemcpuidle[],cat /opt/zabbix/temp.cpu|awk '{print $16}'
    UserParameter=systemcpuwaitio[],cat /opt/zabbix/temp.cpu|awk '{print $15}'
    UserParameter=systemcpurunq[],sar -q 1|grep "Average"|awk '{print $2}'
    And for whatever/some reason they are returning just static (and incorrect) values... i run each command from the command line though and it returns the proper value

    I have them defined as systemcpuuser[] and so on and so forth in the configuration settings as well.

    What am i not seeing?
  • edeus
    Senior Member
    • Aug 2005
    • 120

    #2
    I posted something similar here:



    I found breaking the format of the awk code to break up $1... $99 worked a treat. i.e. "$ 9" instead of $9. I dont know if this is supported syntax by awk though.

    Comment

    • KarmaPolice
      Member
      • Oct 2005
      • 95

      #3
      Thanks, that fixed it... where did you get the CVS version as you mentioned it was fixed in that...

      Comment

      Working...