Ad Widget

Collapse

Triggers with calculated percentage ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SBO
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Sep 2015
    • 226

    #1

    Triggers with calculated percentage ?

    Hi guys,

    I'm still discovering and configuring Zabbix in our dev environment, and I'm trying to improve our actual monitoring.

    I currently have an item that returns a certain number of connection on a server. The query is done every 10mins, and varies between 100 and 4000.

    My question : is it possible to have a trigger on that item that will be activated if there's a difference of xx% between the two last queries ?

    Example :
    Query at 01:00 -> 2000 users connected
    Query at 01:10 -> 2100 users, difference is positive, we don't care
    Query at 01:20 -> 2050 users, -50 users, around 2-3%, no big deal
    Query at 01:30 -> 800 users, around 60% less connections, there's something wrong here

    Is it possible to have a trigger that activates when the difference is, let's say, 20% negative ?
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    Look at the last function, you can use it (with last(#1), last(#2), etc.) to select the most recent, next most recent, etc., then do your own math.

    It's also possible to do a calculated item with the same difference if you want to make use of that differences (or any calculation) in graphs, or just have it show in latest data.

    The painful part (to me) is getting the syntax right, as they made it different in item calculations and trigger calculations. For example, here's an item prototype expression I was just working on:

    last("hrStorageUsed[{#SNMPVALUE}]")

    but here's a prototype trigger expression element:

    {Template SNMP Server Disks:PctUsed[{#SNMPVALUE}].last()}

    It's fairly easy to do pretty complicated stuff, but the syntax can be a bear.

    Comment

    Working...