influxdata/telegraf

ipset: Monitor set size

Open

#12,078 opened on Oct 20, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Go (4,161 forks)batch import
feature requesthelp wantedsize/m

Repository metrics

Stars
 (9,892 stars)
PR merge metrics
 (Avg merge 2d 12h) (136 merged PRs in 30d)

Description

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

Contributor guide