Ad Widget

Collapse

Sum autodiscovered Items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carsa81
    Junior Member
    • Jul 2018
    • 10

    #1

    Sum autodiscovered Items

    Hi

    on my zabbix I have a host with autodiscovered items, with all the same key, like
    hypervisorVmCount[1]
    hypervisorVmCount[2]
    ..
    till 10
    for each item

    I Need to Sum all of this Items, It's better sue aggregate items (googlin' it seems doens't work) or calculated?

    I'd like to obtain a graph with all historical values (these items are being monitored since 1-2 months)

    here https://www.zabbix.com/forum/zabbix-...alculated-item
    nobody gave answer

    This formula doesn't work

    key: VMsCalculated

    formula: sum("hypervisorVmCount[1]")+("hypervisorVmCount[2]")+("hypervisorVmCount[3]")+("hypervisorVmCount[4]")+("hypervisorVmCount[5]")+("hypervisorVmCount[6]")+("hypervisorVmCount[7]")+("hypervisorVmCount[8]")+("hypervisorVmCount[9]")+("hypervisorVmCount[10]")

    (all Items are from same host)


    Last edited by carsa81; 18-07-2018, 11:55.
  • sancho
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2015
    • 295

    #2
    Hello carsa81,

    Change the sum for last and you lack the key.
    For example, from the item protitype vfs.fs.size [{# FSNAME}, used] I discovered a series of units on the server, / etc, / opt ... etc.
    The calculated item that I create is the following:
    Key: spacesused

    Formula:
    last("vfs.fs.size[/tmp/stage,used]")+last("vfs.fs.size[/var/tmp/stage,used]")+last("vfs.fs.size[/usr/local,used]")+last("vfs.fs.size[/var/lib/mysql,used]")+last("vfs.fs.size[/var/log,used]")+last("vfs.fs.size[/opt/bmc,used]")+last("vfs.fs.size[/home,used]")+last("vfs.fs.size[/var/tmp,used]")+last("vfs.fs.size[/usr,used]")+last("vfs.fs.size[/,used]")+last("vfs.fs.size[/opt,used]")+last("vfs.fs.size[/var,used]")+last("vfs.fs.size[/tmp,used]")+last("vfs.fs.size[/boot,used]")

    I do not know if this was your doubt, in the documentation they explain it clearly.



    Sorry for my terrible English.

    Comment

    Working...