Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add internal stat to record number of dropped series/measurements #7697

Closed
gunnaraasen opened this issue Dec 7, 2016 · 3 comments
Closed

Comments

@gunnaraasen
Copy link
Member

Feature Request

Proposal: Add internal stats to track the number of series and measurements dropped.

Current behavior: Series and measurements are dropped silently when shard are dropped or DROP statements are executed.

Desired behavior: It would be nice to have num_series_dropped and num_measurements_dropped fields in the database measurement or whichever internal measurement makes the most sense.

Use case: There is currently no easy way to track the number of dropped series and measurements. Knowing the number of dropped series/measurements is useful for determining the rate series are being removed by a retention policy capacity planning. It is also hard to determine the number of series measurements removed when DROP statements are executed.

@e-dard
Copy link
Contributor

e-dard commented Dec 7, 2016

Related to: #7691.

@jwilder
Copy link
Contributor

jwilder commented Dec 13, 2016

The number of series dropped can be seen using a difference query over the current counters. If it's positive, it's the number series added. If it's negative, it's the number of series deleted.

@gunnaraasen
Copy link
Member Author

Using the difference function works in some cases, but doesn't allow aggregation over a time period that is longer than the internal stats collection interval. For example, running

SELECT difference(max("numSeries")) FROM "influxdb_database" WHERE "host" = 'monitor' AND time > now() - 14d GROUP BY time(1d)

in a busy system with >1M series, the number of net dropped series becomes harder to discern. Sub-queries and the integral function would make this possible, but it feels like an explicit stat is easier to reason about. Tracking (and alerting on) series created/dropped is an integral part of debugging InfluxDB performance issues.

I was going to open some other PRs to add a numSeriesCreated and maybe even shard-level dropped stats, e.g. shard..seriesDropped (mirroring shard..seriesCreate). If this isn't the way to go, then we really need to finish up the _internal stats documentation and add examples.

Also, I'm not sure if these stats will be effectively moot when the TSI is merged.

gunnaraasen added a commit that referenced this issue Jan 20, 2017
Add stats on dropped measurements and series; Fixes #7697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants