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
48 stars 37 forks source link

Add Entity column to Optimization Candidate view #20

Closed StephenGoodall closed 4 years ago

StephenGoodall commented 4 years ago

Summary

I'd like to add the Entity Name to the Optimization Candidate view.

Desired Behaviour

Display an extra column next to hostname to show the entity name - as these are more meaningful than the private IP based names that AWS use by default.

Possible Solution

I have added a new column to the optimizationCandidate.js file and added the column to the NRQL query in utils.js and this seems to work: image

Additional context

We use the display_name value in our newrelic-infra.yml as we use schedules to spin instances up and would prefer to see what "group" of ec2 server it was, eg. is it one of our web servers, or an app server (they run different groups of apps).

After adding that config, the value is stored as entityName so I'd like to be able to see it on the page.

The link that it takes you too is the same as hostname, it's just more human-friendly to see the entity name.

Let me know if you would like me to raise a PR for this if you think it would be useful for others.

tangollama commented 4 years ago

@StephenGoodall, I personally agree with this enhancement and would like to take you up on an offer to PR the project. @Kav91, do you agree?

StephenGoodall commented 4 years ago

@tangollama I just realised I'm on an old version (not sure how as I only cloned it last week - maybe the nr1 nerdpack clone command is looking for the old version) but I've made the relevant changes based on the current master branch instead The changes are the same for the tag 0.1.2 version, which is what nr1 clone pulled down for me. Let me know if I should make the changes on a different branch or anything.

Kav91 commented 4 years ago

@StephenGoodall @tangollama yep this looks good to me, it also made me realize that I have a pointless ternary in there!

I'll merge the PR, then do a follow up commit to bump the version and remove that.

devfreddy commented 4 years ago

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: