newrelic / nr1-cloud-optimize

NR1 Cloud Optimize allows you to Identify right-sizing opportunities and potential savings of your AWS, GCP, and Azure instances across your cloud environment.
https://discuss.newrelic.com/t/cloud-optimizer-nerdpack/82936
Apache License 2.0
50 stars 37 forks source link

Cloud Optimizer not reporting data and reporting console error "We're sorry, but that query is a little too big..." #17

Closed edisoncastro01 closed 4 years ago

edisoncastro01 commented 4 years ago

I am deploying Cloud Optimizer on one of my customer's sub-account. everything goes well until we run the app but it does not pick up any of their Azure instances integrated to their account. One of the errors I see in the browser console is:

"We're sorry, but that query is a little too big..."

We believe the problem has to do with how big the customer environment is and our platform not being able to handle the volume of the results produced by the queries run by the application. In order to reproduce it, you would probably need an environment. as big as the one we are seeing the problem.

We expect at some point that our platform wouldn't break with this volume of data and be able to handle all the instances on our customer's environment.

Here is the console output: image

get instance data error Array(1) 0: locations: [{…}] message: "We're sorry, but that query is a little too big. If using TIMESERIES, try fewer buckets and if faceting, reduce the LIMIT. Contact support@newrelic.com for further assistance." path: (3) ["actor", "account", "system"] proto: Object length: 1 proto: Array(0)

We found a way to make it work and give us data back. Not sure if this is the best fix but here we go just in case : we just changed the NRQL in the …/nr1-cloud-optimize/nerdlets/shared/lib/utils.js file, on line 54, from the original”LIMIT 2000" to a lower limit that does not break, in my case was 198 for non prod and 148 for prod accounts. This gives me some good data but my doubt now is how this would affect the quality of the results. Any Ideas or advice would be greatly appreciated.

Kav91 commented 4 years ago

thanks @edisoncastro01, I have a feeling it could be related too #15 and the extra keys in the query then makes it too large. Will need to look up the NRQL limitations and do some additional query handling.

cc/ @ericmittelhammer

edisoncastro01 commented 4 years ago

Thanks @Kav91, as I mentioned I kind of worked it around by adding a limit to the NRQL that I think brings the host instances in their case of Azure VMs. With this change, we are getting pretty significant savings that we would like to present to our customer CIO in order to highlight the huge value of New Relic. But before we do that I would like to make sure the change on the NRQL doe not affect the quality or reliability of the results especially the savings. Could you help to confirm that?

I can take it to an internal email for more details concerning the customer if you don't mind

Kav91 commented 4 years ago

@edisoncastro01 this nerdpack has been largely refactored in the 2.0.0 release, and this issue should now be resolved. If any further problems, please feel free to raise another issue.