influxdata / influxdata/telegraf

ipset: Monitor set size

Open
#12,078 1 comment 0 reactions 0 assignees View on GitHub
feature request help wanted size/m
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

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

Open the contributing guide

Research direction

Start with Telegraf's ipset input plugin and its existing ipset save collection path. Compare the requested fields from the ipset list command with the current per-entry metrics, and determine how an option such as gather_entries should control them. Done means set-level size metrics can be collected while entry metrics remain optional, matching the example outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
networking, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.