influxdata / influxdata/kapacitor

[Feature Request] Add New Custom Time Window Node with predefined time slices

Open
#1,501 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Hi @nathanielc I would like use kapacitor to build an capacity planning automation system.

We need a way to get data from some metrics in influxdb with a tick Script that could consolidate in one point per day , and after build a regression line to build a forecast to get how much time our systems will be running until we will reach a 100% resource consumption.

I've reviewed all Tick Script nodes , and I will be able to build all except get accurate/custom time windows.

For building our capacity plans we would like to get metric data for only important time. ( usually related to the online defined service)

In online web services could be 24x7 . In this case we would like to use a new node .CustomWindow('24/7').from('yesterday') , and somewhere 24/7 should be defined as from 00:00 to 23:59:

But on some systems we have online processing on work hours and a backup and batch processes at night.

In this last case we want compute 2 different capacity plan

- Online work: .CustomWindow('WorkHours').from('yesterday') and somewhere WorkHours could be defined as => from 8:00 to 12:00 and 13:00 to 17:00.
- Nightly work: .CustomWindow('BatchHours).from('yesterday') and somewhere BatchHours could be defined as => from 21:00 to 06:00

Note that Online work needs to concatenate 2 separated time slices as only one.n

Obviously this new feature should be preceded by TimeZone support as Custom Time Slices depends on the TimeZone. (https://github.com/influxdata/kapacitor/issues/1014)

@nathanielc could be possible add this new feature if we can help you code and test it?

Thanks a lot for your work.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing Tick Script nodes and the prerequisite TimeZone support described in issue #1014; the issue names no implementation files or tests. Done would require a custom window node supporting named predefined slices, multiple slices per day, cross-midnight ranges, and timezone-aware metric selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.