Zabbix - calculated item function over multiple items
Asked Answered
G

2

8

From the Zabbix Manual the calculated items expression follows the form,

func(<key>|<hostname:key>,<parameter1>,<parameter2>,...)

This is fine for computations using functions over a single item like,

max("temp1",120)

How should a function like min() be applied over 3 different items so it returns the lowest of those?

Graft answered 17/8, 2011 at 17:42 Comment(1)
I've originally started the question on serverfault as Zabbix is a NMS (Network Monitoring System)Graft
T
1

Unfortunately, that is currently not supported. You may vote on a feature request: https://support.zabbix.com/browse/ZBXNEXT-1829

Taritariff answered 11/8, 2015 at 12:21 Comment(0)
C
0

The answer is in the documentation here http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/aggregate

Put the hosts into a group "mygroup" and then:

grpmin["mygroup","temp1",last,0]

If instead, you wanted the minimum of 3 items for the same host, don't do this in an item. Instead put the function in the trigger where you can easily trigger when the min temperature reaches a certain value.

Cyathus answered 25/5, 2012 at 6:11 Comment(3)
Thank you Ari. But I already knew about aggregate functions. Please note that my goal is to apply a function over different items, not same named ones in different hosts. Something like min("temp1", "temp3", "temp5", 120)Graft
I tried to answer both possible versions of the ambiguous question you posed. First I explained how to group items from different hosts, then I explained that if you wanted different items in the same host you needed to do that in the trigger, not in another item.Cyathus
Though a Trigger allows to use logical operators over multiple checks (each a function over a single item) that's certainly not what I stated in my goal.Graft

© 2022 - 2024 — McMap. All rights reserved.