Update for summary and export, fix bugs and incorporate CRE workbook#159
Conversation
| DBGeoStorage=dcountif(Name, OSDisk == "grs"), | ||
| DBLrsStorage=dcountif(Name, OSDisk == "lrs"), | ||
| DBGeoStorage=dcountif(Name, OSDisk == "geo"), | ||
| DBLrsStorage=dcountif(Name, OSDisk != "geo"), |
There was a problem hiding this comment.
DBLrsStorage=dcountif(Name, OSDisk != "geo"),
This line counts non-geo which might include ZRS storage as well. Is it intended for LRS count?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Any reason we have to escape 8 backslashes?
There was a problem hiding this comment.
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("\\\\",.
infosatheesh2020
left a comment
There was a problem hiding this comment.
Added few inline comments
|
close #160 |
No description provided.