Ad Widget

Collapse

Help with Trigger on simple UserParameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • o-w
    Junior Member
    • Apr 2015
    • 2

    #1

    Help with Trigger on simple UserParameter

    Hey All,

    I'm having trouble understanding triggers in Zabbix.

    I have a UserParameter, CheckSamba, that runs on a linux system with zabbix-agent running. Values are being returned (0, 1, or 2). I see these values correctly in "latest data".

    If I have a UserParameter setup. An Item setup (I selected "character" to handle the 0, 1 or 2).

    Can you help me write a trigger that sets a high alert if CheckSamba comes back with a 1 or 2? Something like...

    {hostname:CheckSamba()=(1|2)}

    Thanks for any help.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    How about:

    {example.com:CheckSamba.last()}>0

    Where 'example.com' is your host, 'CheckSamba' is your item key and 'last()' is a trigger function that represents the last value of the corresponding item.

    Btw, in your case "Numeric (unsigend)" is probably a better choice for "Type of information"

    See:
    Configuration of Triggers
    Supported trigger functions

    Comment

    • o-w
      Junior Member
      • Apr 2015
      • 2

      #3
      Thanks for the help.

      One strange thing is that when I change the UserParameter item to be Numeric (unsigned), the "make trigger" button in the list of Items for a host disappears. I can go straight into the "Triggers" menu, and i notice it has a different interface. I don't understand why that button on the list of Items page only exists for text fields? (I see now it somehow helps create a different kind of trigger then the trigger page would... but idont get it).

      I tried adding your suggestion as a "Trigger". However when I enter the regular expression you supply it returns

      "Incorrect trigger expression. Check expression part starting from "{HOST:CheckSamba.last() } >0".

      I did finally figure out the expression generator, and it came up with the exact same thing you suggested with no spaces and it took it!

      {HOST:CheckSamba.last()}>0

      Thanks for the help and discussion!

      Comment

      Working...