influxdata/telegraf

ipset: Monitor set size

开放

#12,078 创建于 2022年10月20日

 (1 条评论) (0 个反应) (0 位负责人)Go (5,835 个派生)batch import
feature requesthelp wantedsize/m

仓库指标

星标
 (17,762 个星标)
PR 合并指标
 (平均合并 2天 12小时) (30 天内合并 136 个 PR)

描述

Use Case

I don't want to monitor each entry in my ipset, but I want to monitor the whole ipset size, because I automatically add new items to it.

Expected behavior

The current metric should be optional (e.g. gather_entries like in mysql). Furthermore, there should be an option to gather the whole set size using the ipset list command.

Actual behavior

Only monitoring the entries via ipset save is possible.

Additional info

Example commands:

$ sudo ipset save
create myset hash:net family inet hashsize 1024 maxelem 65536 counters comment
add myset 10.69.152.1 packets 0 bytes 0

→ existing use case, results in metric like ipset,rule=10.69.152.1,set=myset bytes_total=0i,packets_total=0i 1507615028000000000

$ sudo ipset list
Name: myset
Type: hash:net
Revision: 6
Header: family inet hashsize 1024 maxelem 65536 counters comment
Size in memory: 552
References: 0
Number of entries: 1
Members:
10.69.152.1 packets 0 bytes 0

→ new use case, results in metric like ipset_size,set=myset entries=1i,memory_size=552i 1507615028000000000

贡献者指南