最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

zabbix - How to SUM an item created with a small change pre-processor - Stack Overflow

programmeradmin0浏览0评论

I'm using zabbix to collect some data.

I have a value I am monitoring (e.g. inc_value). It is an incrementing value, so each time it is checked it should be larger than before.

It is collected using the key zbx.sts[inc_value]

which runs every minute.

I then apply a pre-processor of simple change to record the amount it has changed in the last minute.

This all works fine.

However, I also want to record the SUM of these values (the changes) over the preceding hour.

Ideally, it also needs to run every 60 seconds to identify when increases and falls occur.

I can see how to get the SUM of the inc_value using a calculated Item, but I need the SUM of the changes, and can't see how to reference that.

I have Zabbix versions 5 and 6 running currently.

I'm using zabbix to collect some data.

I have a value I am monitoring (e.g. inc_value). It is an incrementing value, so each time it is checked it should be larger than before.

It is collected using the key zbx.sts[inc_value]

which runs every minute.

I then apply a pre-processor of simple change to record the amount it has changed in the last minute.

This all works fine.

However, I also want to record the SUM of these values (the changes) over the preceding hour.

Ideally, it also needs to run every 60 seconds to identify when increases and falls occur.

I can see how to get the SUM of the inc_value using a calculated Item, but I need the SUM of the changes, and can't see how to reference that.

I have Zabbix versions 5 and 6 running currently.

Share Improve this question edited Nov 20, 2024 at 10:58 DarkBee 15.6k8 gold badges72 silver badges117 bronze badges asked Nov 20, 2024 at 10:50 IGGtIGGt 2,77910 gold badges45 silver badges66 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

OK, so I worked it out. Create a new item and:

  1. Give it a name
  2. Choose type: calculated
  3. create a key (make one up. I used zbx.clc[inc_value_change_sum]
  4. The formula is: sum(zbx.sts[inc_value], 1h)
  5. Fill in the other sections accordingly

I've checked this manually against the live data, and it appears to be coming up with the right amounts.

发布评论

评论列表(0)

  1. 暂无评论