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

Color code based on NRQL latest result #72

Open
JorgeAlaniz007 opened this issue Oct 22, 2024 · 3 comments
Open

Color code based on NRQL latest result #72

JorgeAlaniz007 opened this issue Oct 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@JorgeAlaniz007
Copy link

This is for the NRQL Status Widget. When configuring this custom viz, we configure a NRQL and a bucket size, lets say we configure the bucket size for 15 minutes, this means we will have 24 squared buckets in the bottom of the widget each running the query for 15 minutes. However, the main result of the query, which is the one used to color code the whole widget, its based on 24x15 = 360 = 6 hours time instead of the last 15 result of the query.

Summary

NRQL result used to color code the widget is based on the bucket size multiplied by 24 buckets (Example: 24 buckets X 15 minutes = 6 hours) instead of showing the result of the last bucket (last 15 minutes)

Desired Behaviour

Widget should color code based on the last result of the NRQL and not the 24 buckets multiplied by bucket size

Possible Solution

Add a toggle to deside if we want the whole 24xBucketSize time or use the latest result of the query

Additional context

We are using status for synthetics monitors, so if the monitor has been failing for a lot of time, and then its fixed, the widget will not go green until some time has passed (5-6 hours in the above example)

@JorgeAlaniz007 JorgeAlaniz007 added the enhancement New feature or request label Oct 22, 2024
@Kav91
Copy link
Member

Kav91 commented Nov 13, 2024

@JorgeAlaniz007 thanks for raising, can you share what NRQL query you are using so we can confirm and investigate this a bit better.

@JorgeAlaniz007
Copy link
Author

@Kav91 sure
SELECT percentage(count(*), where result = 'SUCCESS') as Uptime from SyntheticCheck where monitorName in ('XYZ')
Please let me know for any other detail

@Kav91
Copy link
Member

Kav91 commented Nov 26, 2024

Hi @JorgeAlaniz007 we went back in the prior history and commits of the widget and the original behaviour is what you are describing as what you want as the desired behaviour.

The reason for the change was that if someone was to do that same NRQL query or similar in another widget as a standalone it is not a bucketed query, so the hero/main metric will match. This was so that when the user both writes the query or uses the query live in the editor those metrics will match and have consistency.

So we would need to add a toggle perhaps to use the last bucket instead, but the default behaviour should remain the current behaviour as it'd be a significant breaking change to current users.

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

2 participants