Skip to content

Update for summary and export, fix bugs and incorporate CRE workbook#159

Merged
tsubasaxZZZ merged 7 commits intoAzure:mainfrom
tsubasaxZZZ:tsunomur-0118-update-for-recommender
Apr 16, 2024
Merged

Update for summary and export, fix bugs and incorporate CRE workbook#159
tsubasaxZZZ merged 7 commits intoAzure:mainfrom
tsubasaxZZZ:tsunomur-0118-update-for-recommender

Conversation

@tsubasaxZZZ
Copy link
Contributor

No description provided.

@tsubasaxZZZ tsubasaxZZZ self-assigned this Feb 1, 2024
@tsubasaxZZZ tsubasaxZZZ changed the title Update for summary and export Update for summary and export, fix bugs and incorporate CRE workbook Apr 1, 2024
@tsubasaxZZZ tsubasaxZZZ marked this pull request as ready for review April 1, 2024 08:50
DBGeoStorage=dcountif(Name, OSDisk == "grs"),
DBLrsStorage=dcountif(Name, OSDisk == "lrs"),
DBGeoStorage=dcountif(Name, OSDisk == "geo"),
DBLrsStorage=dcountif(Name, OSDisk != "geo"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DBLrsStorage=dcountif(Name, OSDisk != "geo"),

This line counts non-geo which might include ZRS storage as well. Is it intended for LRS count?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the variable again, DBGeoStorage is currently used to calculate the SQL DB score and DBLrsStorage is not used anywhere.

    // SQLDB - 4 checks  // score = ("status" + "tier" + "storage acct. type"  + "AZ")* 100 / (5 * ResourceTotal)  //********* Future - "read replica count"
    Type == 'microsoft.sql/servers/databases', (DBOnlineStateCount + SqlPremiumOrBusinessCriticalOrDwh + DBGeoStorage + AvZoneCount + NAAvZoneCount) * 100 / (4 * ResourceTotal),

So we can delete DBLrsStorage, but I'd like to keep it just in case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 16: 5 checks for cosmos

"quote": "'",
"delimiter": ",",
"query": "resources\r\n| extend Environment = case(\r\ntags.Environment <> \"\", tags.Environment,\r\ntags.environment <> \"\", tags.environment,\r\ntags.Env <> \"\", tags.Env,\r\ntags.env <> \"\", tags.env,\r\ntolower(name) contains \"prod\", \"Production\",\r\ntolower(name) contains \"dev\", \"Development\",\r\ntolower(name) contains \"qa\", \"QA\",\r\ntolower(name) contains \"uat\", \"UAT\",\r\ntolower(name) contains \"sit\", \"SIT\",\r\ntolower(name) contains \"test\", \"Test\",\r\n\"Undefined\")\r\n| distinct Environment",
"query": "resources\r\n| extend Environment = case(\r\ntags.Environment <> \"\", replace(\"\\\\\\\\\", \"<Backslash>\", tostring(tags.Environment)),\r\ntags.environment <> \"\", replace(\"\\\\\\\\\", \"<Backslash>\", tostring(tags.environment)),\r\ntags.Env <> \"\", replace(\"\\\\\\\\\", \"<Backslash>\", tostring(tags.Env)),\r\ntags.env <> \"\", replace(\"\\\\\\\\\", \"<Backslash>\", tostring(tags.env)),\r\ntolower(name) contains \"prod\", \"Production\",\r\ntolower(name) contains \"dev\", \"Development\",\r\ntolower(name) contains \"qa\", \"QA\",\r\ntolower(name) contains \"uat\", \"UAT\",\r\ntolower(name) contains \"sit\", \"SIT\",\r\ntolower(name) contains \"test\", \"Test\",\r\n\"Undefined\")\r\n| distinct Environment",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we have to escape 8 backslashes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got stuck in the same place.🙃
This is a query in Workbook JSON, so escaping is doubly necessary.
So, replace(\"\\\\\\\\\", is the same as replace("\\\\",.

Copy link
Contributor

@infosatheesh2020 infosatheesh2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added few inline comments

@tsubasaxZZZ tsubasaxZZZ merged commit 1e611a3 into Azure:main Apr 16, 2024
@tsubasaxZZZ
Copy link
Contributor Author

close #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants