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

[BUG] Incorrect Behavior of asPercent and smartSummarize Functions in Different Time Intervals #2817

Open
zzzzzzzzlllllllll opened this issue Aug 3, 2023 · 1 comment

Comments

@zzzzzzzzlllllllll
Copy link

Description:

I am using Grafana along with Graphite for data visualization and monitoring. I have encountered a peculiar behavior involving the asPercent and smartSummarize functions when used with different time intervals.

Scenario:

I have configured the following target configurations:

target A: This target has only one series of data.
target B: This target can have multiple series of data.
I'm utilizing the following query to calculate the percentage of target B compared to target A:

plaintext
Copy code
smartSummarize(asPercent(sumSeries(#B), #A))
This query provides accurate results when aggregating by either a 1-minute or 1-day time interval.

However, when I use the following query to achieve the same result:

plaintext
Copy code
smartSummarize(sumSeries(asPercent(#B, #A)))
The query works as expected when aggregated by a 1-minute interval, but the results become incorrect when aggregated by a 1-day interval.

Expected Behavior:

I would expect both query variations to produce consistent and accurate results, regardless of the aggregation interval used.

Actual Behavior:

When using the smartSummarize(sumSeries(asPercent(#B, #A))) query, the results are accurate for 1-minute intervals but become erroneous when aggregated over a 1-day interval.

Steps to Reproduce:

image

Configure target A and target B as described above.
Execute the two query variations for different aggregation intervals (1m and 1d).
Observe the discrepancies in the results between the two query variations and across different aggregation intervals.
Additional Information:

I have verified the correctness of data inputs and query parameters.
This phenomenon persists across different versions of Graphite and Grafana.
I have also ensured there are no issues related to cache or system resources.
Screenshots:

[Attach any relevant screenshots showing the difference in results between the two query variations and aggregation intervals.]

Environment:

Graphite Version: [Specify the version]
Grafana Version: [Specify the version]
Operating System: [Specify the OS]
Conclusion:

The observed behavior raises questions regarding the interaction between asPercent and smartSummarize functions when used with different time intervals. I believe this inconsistency might be a bug that needs attention and resolution from the Graphite development team.

I appreciate your time and attention to this matter. Please let me know if any additional information is required to investigate and resolve this issue.

Thank you!

Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 15, 2023
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

1 participant