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 support for Graphite web movingWindow() function #27

Closed
carrieedwards opened this issue Jul 8, 2022 · 0 comments
Closed

Add support for Graphite web movingWindow() function #27

carrieedwards opened this issue Jul 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@carrieedwards
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The movingWindow() function is implemented in Graphite web, but is missing from CarbonAPI. In order to enable users to be able to use the movingWindow() function, it needs to be implemented in CarbonAPI.

Describe the solution you'd like
The movingWindow() function should be implemented in CarbonAPI, with the same functionality as the Graphite web function. The description of the function is as follows:

movingWindow(seriesList, windowSize, func='average', xFilesFactor=None)
Graphs a moving window function of a metric (or metrics) over a fixed number of past points, or a time interval.

Takes one metric or a wildcard seriesList, a number N of datapoints or a quoted string with a length of time like ‘1hour’ or ‘5min’ (See from / until in the [Render API](https://graphite.readthedocs.io/en/latest/render_api.html) for examples of time formats), a function to apply to the points in the window to produce the output, and an xFilesFactor value to specify how many points in the window must be non-null for the output to be considered valid. Graphs the output of the function for the preceeding datapoints for each point on the graph.

Example:

&target=movingWindow(Server.instance01.threads.busy,10)
&target=movingWindow(Server.instance*.threads.idle,'5min','median',0.5)

Additional context
Tests should be added to verify that the functionality matches that of the Graphite web movingWindow() function.

@carrieedwards carrieedwards added the enhancement New feature or request label Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant