Ad Widget

Collapse

Problem with UserParameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #1

    Problem with UserParameter

    I have configured a UserParameter as follows:
    Code:
    UserParameter=proc.cnt.name[*],ps -efa|grep -i $1|grep -v grep|wc -l
    when i test this item, i always get back the correct value +1:
    Code:
    [root@oracle-stdby-pbs ~]# zabbix_agentd -t proc.cnt.name[mingetty]
    proc.cnt.name[ps -efa|grep -i mingetty|grep -v grep|wc -l]  [s|[color=red]7[/color]]
    Code:
    [root@oracle-stdby-pbs ~]# ps -efa|grep -i mingetty|grep -v grep|wc -l
    [color=red]6[/color]
    Can somebody explain this behaviour to me and/or help me to solve this problem?
    Last edited by just2blue4u; 23-05-2006, 09:24.
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)
  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #2
    What i found out today:
    When i include that item into the frontend, the value i get back is the correct value (6).

    perhaps now someone has a clue (i don't )...
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

    Comment

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

      #3
      Come on! The "zabbix_agentd -t proc.cnt.name[mingetty]" obviously is calculated as well because of "grep mingetty".
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • just2blue4u
        Senior Member
        • Apr 2006
        • 347

        #4
        Sometimes the solution is nearer than you'd think...

        Thx!
        Big ZABBIX is watching you!
        (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

        Comment

        • azilber
          Member
          • Apr 2005
          • 33

          #5
          Originally posted by just2blue4u
          I have configured a UserParameter as follows:
          Code:
          UserParameter=proc.cnt.name[*],ps -efa|grep -i $1|grep -v grep|wc -l
          when i test this item, i always get back the correct value +1:
          Code:
          [root@oracle-stdby-pbs ~]# zabbix_agentd -t proc.cnt.name[mingetty]
          proc.cnt.name[ps -efa|grep -i mingetty|grep -v grep|wc -l]  [s|[color=red]7[/color]]
          Code:
          [root@oracle-stdby-pbs ~]# ps -efa|grep -i mingetty|grep -v grep|wc -l
          [color=red]6[/color]
          Can somebody explain this behaviour to me and/or help me to solve this problem?

          As a side note, it seems that user parameters with brackets: "[" and "]" are not supported, if they are in fact custom keys.

          Comment

          Working...