sqldb.json 151 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553
  1. {
  2. "__requires": [
  3. {
  4. "type": "grafana",
  5. "id": "grafana",
  6. "name": "Grafana",
  7. "version": "7.4.3"
  8. },
  9. {
  10. "type": "datasource",
  11. "id": "grafana-azure-monitor-datasource",
  12. "name": "Azure Monitor",
  13. "version": "0.3.0"
  14. },
  15. {
  16. "type": "panel",
  17. "id": "stat",
  18. "name": "Stat",
  19. "version": ""
  20. },
  21. {
  22. "type": "panel",
  23. "id": "timeseries",
  24. "name": "Time series",
  25. "version": ""
  26. }
  27. ],
  28. "annotations": {
  29. "list": []
  30. },
  31. "editable": true,
  32. "gnetId": null,
  33. "graphTooltip": 0,
  34. "id": null,
  35. "iteration": 1622167538209,
  36. "links": [],
  37. "panels": [
  38. {
  39. "datasource": "$ds",
  40. "fieldConfig": {
  41. "defaults": {
  42. "color": {
  43. "fixedColor": "blue",
  44. "mode": "fixed"
  45. },
  46. "custom": {},
  47. "mappings": [],
  48. "thresholds": {
  49. "mode": "absolute",
  50. "steps": []
  51. }
  52. },
  53. "overrides": [
  54. {
  55. "matcher": {
  56. "id": "byName",
  57. "options": "Number of Deadlocks/sec"
  58. },
  59. "properties": [
  60. {
  61. "id": "displayName",
  62. "value": "Deadlocks/sec"
  63. }
  64. ]
  65. },
  66. {
  67. "matcher": {
  68. "id": "byName",
  69. "options": "Data File(s) Size (KB)"
  70. },
  71. "properties": [
  72. {
  73. "id": "displayName",
  74. "value": "Data file size"
  75. },
  76. {
  77. "id": "unit",
  78. "value": "deckbytes"
  79. }
  80. ]
  81. },
  82. {
  83. "matcher": {
  84. "id": "byName",
  85. "options": "Log File(s) Size (KB)"
  86. },
  87. "properties": [
  88. {
  89. "id": "displayName",
  90. "value": "Log file size"
  91. },
  92. {
  93. "id": "unit",
  94. "value": "deckbytes"
  95. }
  96. ]
  97. },
  98. {
  99. "matcher": {
  100. "id": "byName",
  101. "options": "Log File(s) Used Size (KB)"
  102. },
  103. "properties": [
  104. {
  105. "id": "displayName",
  106. "value": "Log file used size"
  107. },
  108. {
  109. "id": "unit",
  110. "value": "deckbytes"
  111. }
  112. ]
  113. },
  114. {
  115. "matcher": {
  116. "id": "byName",
  117. "options": "Free Space in tempdb (KB)"
  118. },
  119. "properties": [
  120. {
  121. "id": "displayName",
  122. "value": "Free space in tempdb"
  123. },
  124. {
  125. "id": "unit",
  126. "value": "deckbytes"
  127. }
  128. ]
  129. },
  130. {
  131. "matcher": {
  132. "id": "byName",
  133. "options": "Memory broker clerk size"
  134. },
  135. "properties": [
  136. {
  137. "id": "unit",
  138. "value": "deckbytes"
  139. }
  140. ]
  141. }
  142. ]
  143. },
  144. "gridPos": {
  145. "h": 5,
  146. "w": 24,
  147. "x": 0,
  148. "y": 0
  149. },
  150. "id": 6,
  151. "options": {
  152. "colorMode": "value",
  153. "graphMode": "none",
  154. "justifyMode": "auto",
  155. "orientation": "auto",
  156. "reduceOptions": {
  157. "calcs": ["lastNotNull"],
  158. "fields": "",
  159. "values": true
  160. },
  161. "text": {},
  162. "textMode": "value_and_name"
  163. },
  164. "pluginVersion": "7.4.3",
  165. "targets": [
  166. {
  167. "appInsights": {
  168. "dimension": [],
  169. "metricName": "select",
  170. "timeGrain": "auto"
  171. },
  172. "azureLogAnalytics": {
  173. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and (Database == '$db' or '*' == '$db') and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| where Counter in~ ('User connections', 'Active Temp Tables')\r\n| summarize EndValue = max(Val) by Counter\n| extend p = pack(Counter, EndValue)\r\n| summarize bag=make_bag(p)\r\n| evaluate bag_unpack(bag)",
  174. "resultFormat": "time_series",
  175. "workspace": "$ws"
  176. },
  177. "azureMonitor": {
  178. "aggOptions": [],
  179. "dimensionFilter": "*",
  180. "dimensionFilters": [],
  181. "metricDefinition": "select",
  182. "metricName": "select",
  183. "metricNamespace": "select",
  184. "resourceGroup": "select",
  185. "resourceName": "select",
  186. "timeGrain": "auto",
  187. "timeGrains": [],
  188. "top": "10"
  189. },
  190. "hide": false,
  191. "insightsAnalytics": {
  192. "query": "",
  193. "resultFormat": "time_series"
  194. },
  195. "queryType": "Azure Log Analytics",
  196. "refId": "A",
  197. "subscription": "$sub"
  198. },
  199. {
  200. "appInsights": {
  201. "dimension": [],
  202. "metricName": "select",
  203. "timeGrain": "auto"
  204. },
  205. "azureLogAnalytics": {
  206. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and (Database == '$db' or '*' == '$db') and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| where Counter in~ ('Memory Grants Pending', 'Number of deadlocks/sec', 'Processes blocked')\r\n| summarize (T, EndValue) = arg_max(TimeGenerated, Val) by Counter\n| project-away T\n| extend p = pack(Counter, EndValue)\r\n| summarize bag=make_bag(p)\r\n| evaluate bag_unpack(bag)\n",
  207. "resultFormat": "time_series",
  208. "workspace": "$ws"
  209. },
  210. "azureMonitor": {
  211. "aggOptions": [],
  212. "dimensionFilter": "*",
  213. "dimensionFilters": [],
  214. "metricDefinition": "select",
  215. "metricName": "select",
  216. "metricNamespace": "select",
  217. "resourceGroup": "select",
  218. "resourceName": "select",
  219. "timeGrain": "auto",
  220. "timeGrains": [],
  221. "top": "10"
  222. },
  223. "hide": false,
  224. "insightsAnalytics": {
  225. "query": "",
  226. "resultFormat": "time_series"
  227. },
  228. "queryType": "Azure Log Analytics",
  229. "refId": "B",
  230. "subscription": "$sub"
  231. }
  232. ],
  233. "title": "Key Stats",
  234. "transformations": [],
  235. "transparent": true,
  236. "type": "stat"
  237. },
  238. {
  239. "datasource": "$ds",
  240. "fieldConfig": {
  241. "defaults": {
  242. "color": {
  243. "fixedColor": "blue",
  244. "mode": "fixed"
  245. },
  246. "custom": {},
  247. "mappings": [],
  248. "thresholds": {
  249. "mode": "absolute",
  250. "steps": []
  251. }
  252. },
  253. "overrides": [
  254. {
  255. "matcher": {
  256. "id": "byName",
  257. "options": "Number of Deadlocks/sec"
  258. },
  259. "properties": [
  260. {
  261. "id": "displayName",
  262. "value": "Deadlocks/sec"
  263. }
  264. ]
  265. },
  266. {
  267. "matcher": {
  268. "id": "byName",
  269. "options": "Data File(s) Size (KB)"
  270. },
  271. "properties": [
  272. {
  273. "id": "displayName",
  274. "value": "Data file size"
  275. },
  276. {
  277. "id": "unit",
  278. "value": "deckbytes"
  279. }
  280. ]
  281. },
  282. {
  283. "matcher": {
  284. "id": "byName",
  285. "options": "Log File(s) Size (KB)"
  286. },
  287. "properties": [
  288. {
  289. "id": "displayName",
  290. "value": "Log file size"
  291. },
  292. {
  293. "id": "unit",
  294. "value": "deckbytes"
  295. }
  296. ]
  297. },
  298. {
  299. "matcher": {
  300. "id": "byName",
  301. "options": "Log File(s) Used Size (KB)"
  302. },
  303. "properties": [
  304. {
  305. "id": "displayName",
  306. "value": "Log file used size"
  307. },
  308. {
  309. "id": "unit",
  310. "value": "deckbytes"
  311. }
  312. ]
  313. },
  314. {
  315. "matcher": {
  316. "id": "byName",
  317. "options": "Free Space in tempdb (KB)"
  318. },
  319. "properties": [
  320. {
  321. "id": "displayName",
  322. "value": "Free space in tempdb"
  323. },
  324. {
  325. "id": "unit",
  326. "value": "deckbytes"
  327. }
  328. ]
  329. },
  330. {
  331. "matcher": {
  332. "id": "byName",
  333. "options": "Memory broker clerk size"
  334. },
  335. "properties": [
  336. {
  337. "id": "unit",
  338. "value": "deckbytes"
  339. }
  340. ]
  341. }
  342. ]
  343. },
  344. "gridPos": {
  345. "h": 6,
  346. "w": 24,
  347. "x": 0,
  348. "y": 5
  349. },
  350. "id": 9,
  351. "options": {
  352. "colorMode": "value",
  353. "graphMode": "none",
  354. "justifyMode": "auto",
  355. "orientation": "auto",
  356. "reduceOptions": {
  357. "calcs": ["lastNotNull"],
  358. "fields": "",
  359. "values": true
  360. },
  361. "text": {},
  362. "textMode": "value_and_name"
  363. },
  364. "pluginVersion": "7.4.3",
  365. "targets": [
  366. {
  367. "appInsights": {
  368. "dimension": [],
  369. "metricName": "select",
  370. "timeGrain": "auto"
  371. },
  372. "azureLogAnalytics": {
  373. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and (Database == '$db' or '*' == '$db') and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| where tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) =~ 'total' and Counter in~ ('Data File(s) Size (KB)', 'Log File(s) Size (KB)', 'Log File(s) Used Size (KB)')\r\n| summarize (End, EndValue) = arg_max(TimeGenerated, Val) by Counter\n| project-away End\n| extend p = pack(Counter, EndValue)\r\n| summarize bag=make_bag(p)\r\n| evaluate bag_unpack(bag)\n",
  374. "resultFormat": "time_series",
  375. "workspace": "$ws"
  376. },
  377. "azureMonitor": {
  378. "aggOptions": [],
  379. "dimensionFilter": "*",
  380. "dimensionFilters": [],
  381. "metricDefinition": "select",
  382. "metricName": "select",
  383. "metricNamespace": "select",
  384. "resourceGroup": "select",
  385. "resourceName": "select",
  386. "timeGrain": "auto",
  387. "timeGrains": [],
  388. "top": "10"
  389. },
  390. "hide": false,
  391. "insightsAnalytics": {
  392. "query": "",
  393. "resultFormat": "time_series"
  394. },
  395. "queryType": "Azure Log Analytics",
  396. "refId": "C",
  397. "subscription": "$sub"
  398. },
  399. {
  400. "appInsights": {
  401. "dimension": [],
  402. "metricName": "select",
  403. "timeGrain": "auto"
  404. },
  405. "azureLogAnalytics": {
  406. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and (Database == '$db' or '*' == '$db') and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| where Counter =~ 'Free Space in tempdb (KB)'\r\n| summarize EndValue = min(Val) by Counter\n| extend p = pack(Counter, EndValue)\r\n| summarize bag=make_bag(p)\r\n| evaluate bag_unpack(bag)\n",
  407. "resultFormat": "time_series",
  408. "workspace": "$ws"
  409. },
  410. "azureMonitor": {
  411. "aggOptions": [],
  412. "dimensionFilter": "*",
  413. "dimensionFilters": [],
  414. "metricDefinition": "select",
  415. "metricName": "select",
  416. "metricNamespace": "select",
  417. "resourceGroup": "select",
  418. "resourceName": "select",
  419. "timeGrain": "auto",
  420. "timeGrains": [],
  421. "top": "10"
  422. },
  423. "hide": false,
  424. "insightsAnalytics": {
  425. "query": "",
  426. "resultFormat": "time_series"
  427. },
  428. "queryType": "Azure Log Analytics",
  429. "refId": "D",
  430. "subscription": "$sub"
  431. },
  432. {
  433. "appInsights": {
  434. "dimension": [],
  435. "metricName": "select",
  436. "timeGrain": "auto"
  437. },
  438. "azureLogAnalytics": {
  439. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and (Database == '$db' or '*' == '$db') and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| where Counter =~ 'Memory broker clerk size' and DbInstance =~ 'Buffer Pool'\r\n| summarize (End, EndValue) = arg_max(TimeGenerated, Val) by Counter\r\n| extend EndValue = EndValue * 8\n| project-away End\n| extend p = pack(Counter, EndValue)\r\n| summarize bag=make_bag(p)\r\n| evaluate bag_unpack(bag)\n",
  440. "resultFormat": "time_series",
  441. "workspace": "$ws"
  442. },
  443. "azureMonitor": {
  444. "aggOptions": [],
  445. "dimensionFilter": "*",
  446. "dimensionFilters": [],
  447. "metricDefinition": "select",
  448. "metricName": "select",
  449. "metricNamespace": "select",
  450. "resourceGroup": "select",
  451. "resourceName": "select",
  452. "timeGrain": "auto",
  453. "timeGrains": [],
  454. "top": "10"
  455. },
  456. "hide": false,
  457. "insightsAnalytics": {
  458. "query": "",
  459. "resultFormat": "time_series"
  460. },
  461. "queryType": "Azure Log Analytics",
  462. "refId": "E",
  463. "subscription": "$sub"
  464. }
  465. ],
  466. "title": "",
  467. "transformations": [],
  468. "transparent": true,
  469. "type": "stat"
  470. },
  471. {
  472. "datasource": "$ds",
  473. "fieldConfig": {
  474. "defaults": {
  475. "color": {
  476. "mode": "palette-classic"
  477. },
  478. "custom": {
  479. "axisLabel": "",
  480. "axisPlacement": "auto",
  481. "barAlignment": 0,
  482. "drawStyle": "line",
  483. "fillOpacity": 10,
  484. "gradientMode": "none",
  485. "hideFrom": {
  486. "graph": false,
  487. "legend": false,
  488. "tooltip": false
  489. },
  490. "lineInterpolation": "linear",
  491. "lineWidth": 1,
  492. "pointSize": 5,
  493. "scaleDistribution": {
  494. "type": "linear"
  495. },
  496. "showPoints": "never",
  497. "spanNulls": true
  498. },
  499. "mappings": [],
  500. "thresholds": {
  501. "mode": "absolute",
  502. "steps": []
  503. },
  504. "unit": "percent"
  505. },
  506. "overrides": []
  507. },
  508. "gridPos": {
  509. "h": 7,
  510. "w": 8,
  511. "x": 0,
  512. "y": 11
  513. },
  514. "id": 2,
  515. "options": {
  516. "legend": {
  517. "calcs": [],
  518. "displayMode": "list",
  519. "placement": "bottom"
  520. },
  521. "tooltipOptions": {
  522. "mode": "single"
  523. }
  524. },
  525. "pluginVersion": "7.4.3",
  526. "targets": [
  527. {
  528. "appInsights": {
  529. "dimension": [],
  530. "metricName": "select",
  531. "timeGrain": "auto"
  532. },
  533. "azureLogAnalytics": {
  534. "query": "\r\n\r\nInsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\r\n| where Instance == '$SqlInstance'\r\n| where Namespace =~ 'sqlserver_azure_db_resource_stats' and Name == 'avg_instance_cpu_percent' and Tags.replica_updateability == iff('primary' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| summarize ['Avg Instance CPU'] = avg(Val) by bin(TimeGenerated, $__interval)",
  535. "resultFormat": "table",
  536. "workspace": "$ws"
  537. },
  538. "azureMonitor": {
  539. "aggOptions": [],
  540. "dimensionFilter": "*",
  541. "dimensionFilters": [],
  542. "metricDefinition": "select",
  543. "metricName": "select",
  544. "metricNamespace": "select",
  545. "resourceGroup": "select",
  546. "resourceName": "select",
  547. "timeGrain": "auto",
  548. "timeGrains": [],
  549. "top": "10"
  550. },
  551. "insightsAnalytics": {
  552. "query": "",
  553. "resultFormat": "time_series"
  554. },
  555. "queryType": "Azure Log Analytics",
  556. "refId": "A",
  557. "subscription": "$sub"
  558. },
  559. {
  560. "appInsights": {
  561. "dimension": [],
  562. "metricName": "select",
  563. "timeGrain": "auto"
  564. },
  565. "azureLogAnalytics": {
  566. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\r\n| where Instance == '$SqlInstance'\r\n| where Namespace =~ 'sqlserver_azure_db_resource_stats' and Name == 'avg_cpu_percent' and Tags.replica_updateability == iff('primary' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| summarize ['Avg CPU'] = avg(Val) by bin(TimeGenerated, $__interval)",
  567. "resultFormat": "time_series",
  568. "workspace": "$ws"
  569. },
  570. "azureMonitor": {
  571. "aggOptions": [],
  572. "dimensionFilter": "*",
  573. "dimensionFilters": [],
  574. "metricDefinition": "select",
  575. "metricName": "select",
  576. "metricNamespace": "select",
  577. "resourceGroup": "select",
  578. "resourceName": "select",
  579. "timeGrain": "auto",
  580. "timeGrains": [],
  581. "top": "10"
  582. },
  583. "hide": false,
  584. "insightsAnalytics": {
  585. "query": "",
  586. "resultFormat": "time_series"
  587. },
  588. "queryType": "Azure Log Analytics",
  589. "refId": "B",
  590. "subscription": "$sub"
  591. }
  592. ],
  593. "timeFrom": null,
  594. "timeShift": null,
  595. "title": "CPU",
  596. "transformations": [],
  597. "type": "timeseries"
  598. },
  599. {
  600. "datasource": "$ds",
  601. "fieldConfig": {
  602. "defaults": {
  603. "color": {
  604. "mode": "palette-classic"
  605. },
  606. "custom": {
  607. "axisLabel": "",
  608. "axisPlacement": "auto",
  609. "barAlignment": 0,
  610. "drawStyle": "line",
  611. "fillOpacity": 10,
  612. "gradientMode": "none",
  613. "hideFrom": {
  614. "graph": false,
  615. "legend": false,
  616. "tooltip": false
  617. },
  618. "lineInterpolation": "linear",
  619. "lineWidth": 1,
  620. "pointSize": 5,
  621. "scaleDistribution": {
  622. "type": "linear"
  623. },
  624. "showPoints": "never",
  625. "spanNulls": true
  626. },
  627. "mappings": [],
  628. "thresholds": {
  629. "mode": "absolute",
  630. "steps": []
  631. },
  632. "unit": "percent"
  633. },
  634. "overrides": []
  635. },
  636. "gridPos": {
  637. "h": 7,
  638. "w": 8,
  639. "x": 8,
  640. "y": 11
  641. },
  642. "id": 3,
  643. "options": {
  644. "legend": {
  645. "calcs": [],
  646. "displayMode": "list",
  647. "placement": "bottom"
  648. },
  649. "tooltipOptions": {
  650. "mode": "single"
  651. }
  652. },
  653. "pluginVersion": "7.4.3",
  654. "targets": [
  655. {
  656. "appInsights": {
  657. "dimension": [],
  658. "metricName": "select",
  659. "timeGrain": "auto"
  660. },
  661. "azureLogAnalytics": {
  662. "query": "\r\n\r\nInsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\r\n| where Instance == '$SqlInstance'\r\n| where Namespace =~ 'sqlserver_azure_db_resource_stats' and Name == 'avg_instance_memory_percent' and Tags.replica_updateability == iff('primary' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| summarize ['Avg Instance Memory'] = avg(Val) by bin(TimeGenerated, $__interval)",
  663. "resultFormat": "table",
  664. "workspace": "$ws"
  665. },
  666. "azureMonitor": {
  667. "aggOptions": [],
  668. "dimensionFilter": "*",
  669. "dimensionFilters": [],
  670. "metricDefinition": "select",
  671. "metricName": "select",
  672. "metricNamespace": "select",
  673. "resourceGroup": "select",
  674. "resourceName": "select",
  675. "timeGrain": "auto",
  676. "timeGrains": [],
  677. "top": "10"
  678. },
  679. "insightsAnalytics": {
  680. "query": "",
  681. "resultFormat": "time_series"
  682. },
  683. "queryType": "Azure Log Analytics",
  684. "refId": "A",
  685. "subscription": "$sub"
  686. },
  687. {
  688. "appInsights": {
  689. "dimension": [],
  690. "metricName": "select",
  691. "timeGrain": "auto"
  692. },
  693. "azureLogAnalytics": {
  694. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\r\n| where Instance == '$SqlInstance'\r\n| where Namespace =~ 'sqlserver_azure_db_resource_stats' and Name == 'avg_memory_usage_percent' and Tags.replica_updateability == iff('primary' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| summarize ['Avg Memory'] = avg(Val) by bin(TimeGenerated, $__interval)",
  695. "resultFormat": "time_series",
  696. "workspace": "$ws"
  697. },
  698. "azureMonitor": {
  699. "aggOptions": [],
  700. "dimensionFilter": "*",
  701. "dimensionFilters": [],
  702. "metricDefinition": "select",
  703. "metricName": "select",
  704. "metricNamespace": "select",
  705. "resourceGroup": "select",
  706. "resourceName": "select",
  707. "timeGrain": "auto",
  708. "timeGrains": [],
  709. "top": "10"
  710. },
  711. "hide": false,
  712. "insightsAnalytics": {
  713. "query": "",
  714. "resultFormat": "time_series"
  715. },
  716. "queryType": "Azure Log Analytics",
  717. "refId": "B",
  718. "subscription": "$sub"
  719. }
  720. ],
  721. "timeFrom": null,
  722. "timeShift": null,
  723. "title": "Memory",
  724. "transformations": [],
  725. "type": "timeseries"
  726. },
  727. {
  728. "datasource": "$ds",
  729. "fieldConfig": {
  730. "defaults": {
  731. "color": {
  732. "mode": "palette-classic"
  733. },
  734. "custom": {
  735. "axisLabel": "",
  736. "axisPlacement": "auto",
  737. "barAlignment": 0,
  738. "drawStyle": "line",
  739. "fillOpacity": 10,
  740. "gradientMode": "none",
  741. "hideFrom": {
  742. "graph": false,
  743. "legend": false,
  744. "tooltip": false
  745. },
  746. "lineInterpolation": "linear",
  747. "lineWidth": 1,
  748. "pointSize": 5,
  749. "scaleDistribution": {
  750. "type": "linear"
  751. },
  752. "showPoints": "never",
  753. "spanNulls": true
  754. },
  755. "mappings": [],
  756. "thresholds": {
  757. "mode": "absolute",
  758. "steps": []
  759. },
  760. "unit": "percent"
  761. },
  762. "overrides": []
  763. },
  764. "gridPos": {
  765. "h": 7,
  766. "w": 8,
  767. "x": 16,
  768. "y": 11
  769. },
  770. "id": 4,
  771. "options": {
  772. "legend": {
  773. "calcs": [],
  774. "displayMode": "list",
  775. "placement": "bottom"
  776. },
  777. "tooltipOptions": {
  778. "mode": "single"
  779. }
  780. },
  781. "pluginVersion": "7.4.3",
  782. "targets": [
  783. {
  784. "appInsights": {
  785. "dimension": [],
  786. "metricName": "select",
  787. "timeGrain": "auto"
  788. },
  789. "azureLogAnalytics": {
  790. "query": "\r\n\r\nInsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\r\n| where Instance == '$SqlInstance'\r\n| where Namespace =~ 'sqlserver_azure_db_resource_stats' and Name == 'avg_data_io_percent' and Tags.replica_updateability == iff('primary' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| summarize ['Avg Data I/O'] = avg(Val) by bin(TimeGenerated, $__interval)",
  791. "resultFormat": "table",
  792. "workspace": "$ws"
  793. },
  794. "azureMonitor": {
  795. "aggOptions": [],
  796. "dimensionFilter": "*",
  797. "dimensionFilters": [],
  798. "metricDefinition": "select",
  799. "metricName": "select",
  800. "metricNamespace": "select",
  801. "resourceGroup": "select",
  802. "resourceName": "select",
  803. "timeGrain": "auto",
  804. "timeGrains": [],
  805. "top": "10"
  806. },
  807. "insightsAnalytics": {
  808. "query": "",
  809. "resultFormat": "time_series"
  810. },
  811. "queryType": "Azure Log Analytics",
  812. "refId": "A",
  813. "subscription": "$sub"
  814. },
  815. {
  816. "appInsights": {
  817. "dimension": [],
  818. "metricName": "select",
  819. "timeGrain": "auto"
  820. },
  821. "azureLogAnalytics": {
  822. "query": "InsightsMetrics\n| where $__timeFilter()\n\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\r\n| where Instance == '$SqlInstance'\r\n| where Namespace =~ 'sqlserver_azure_db_resource_stats' and Name == 'avg_log_write_percent' and Tags.replica_updateability == iff('primary' == 'secondary', 'READ_ONLY', 'READ_WRITE')\n| summarize ['Avg Log Writes'] = avg(Val) by bin(TimeGenerated, $__interval)",
  823. "resultFormat": "time_series",
  824. "workspace": "$ws"
  825. },
  826. "azureMonitor": {
  827. "aggOptions": [],
  828. "dimensionFilter": "*",
  829. "dimensionFilters": [],
  830. "metricDefinition": "select",
  831. "metricName": "select",
  832. "metricNamespace": "select",
  833. "resourceGroup": "select",
  834. "resourceName": "select",
  835. "timeGrain": "auto",
  836. "timeGrains": [],
  837. "top": "10"
  838. },
  839. "hide": false,
  840. "insightsAnalytics": {
  841. "query": "",
  842. "resultFormat": "time_series"
  843. },
  844. "queryType": "Azure Log Analytics",
  845. "refId": "B",
  846. "subscription": "$sub"
  847. }
  848. ],
  849. "timeFrom": null,
  850. "timeShift": null,
  851. "title": "Data I/O",
  852. "transformations": [],
  853. "type": "timeseries"
  854. },
  855. {
  856. "datasource": "$ds",
  857. "fieldConfig": {
  858. "defaults": {
  859. "color": {
  860. "mode": "palette-classic"
  861. },
  862. "custom": {
  863. "axisLabel": "",
  864. "axisPlacement": "auto",
  865. "barAlignment": 0,
  866. "drawStyle": "line",
  867. "fillOpacity": 10,
  868. "gradientMode": "hue",
  869. "hideFrom": {
  870. "graph": false,
  871. "legend": false,
  872. "tooltip": false
  873. },
  874. "lineInterpolation": "linear",
  875. "lineStyle": {
  876. "fill": "solid"
  877. },
  878. "lineWidth": 1,
  879. "pointSize": 9,
  880. "scaleDistribution": {
  881. "type": "linear"
  882. },
  883. "showPoints": "never",
  884. "spanNulls": true
  885. },
  886. "mappings": [],
  887. "thresholds": {
  888. "mode": "absolute",
  889. "steps": [
  890. {
  891. "color": "green",
  892. "value": null
  893. }
  894. ]
  895. },
  896. "unit": "ms"
  897. },
  898. "overrides": [
  899. {
  900. "matcher": {
  901. "id": "byRegexp",
  902. "options": "^(WaitType.*)"
  903. },
  904. "properties": [
  905. {
  906. "id": "displayName"
  907. }
  908. ]
  909. }
  910. ]
  911. },
  912. "gridPos": {
  913. "h": 8,
  914. "w": 24,
  915. "x": 0,
  916. "y": 18
  917. },
  918. "id": 8,
  919. "options": {
  920. "legend": {
  921. "calcs": [],
  922. "displayMode": "table",
  923. "placement": "right"
  924. },
  925. "tooltipOptions": {
  926. "mode": "single"
  927. }
  928. },
  929. "pluginVersion": "7.4.3",
  930. "targets": [
  931. {
  932. "appInsights": {
  933. "dimension": [],
  934. "metricName": "select",
  935. "timeGrain": "auto"
  936. },
  937. "azureLogAnalytics": {
  938. "query": "InsightsMetrics \n| where $__timeFilter()\n| where Namespace in~ ('sqlserver_azuredb_waitstats', 'sqlserver_waitstats') and Name =~ 'wait_time_ms'\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(iff(Tags[\"database_name'\"] == '', Tags[\"database_name\"], Tags[\"database_name'\"])), Instance = tostring(Tags.sql_instance), WaitType = tostring(Tags.wait_type), WaitCategory = tostring(Tags.wait_category)\r\n| where Instance == '$SqlInstance' and (Database == '$db' or '*' == '$db')\r\n| order by Computer asc, Instance asc, Database asc, Namespace asc, Name asc, WaitType asc, TimeGenerated asc\r\n| extend WaitCategory = iff(isempty(WaitCategory), \"Other\", WaitCategory)\r\n| extend Val = iff(Computer == prev(Computer) and Instance == prev(Instance) and Database == prev(Database) and Namespace == prev(Namespace) and Name == prev(Name) and WaitType == prev(WaitType) and Val > prev(Val), Val - prev(Val), real(null))\n| summarize Val = avg(Val) by bin(TimeGenerated, $__interval), WaitCategory\n| extend Val = iff(isnan(Val), real(0), Val)\n| order by TimeGenerated asc",
  939. "resultFormat": "time_series",
  940. "workspace": "$ws"
  941. },
  942. "azureMonitor": {
  943. "aggOptions": [],
  944. "dimensionFilter": "*",
  945. "dimensionFilters": [],
  946. "metricDefinition": "select",
  947. "metricName": "select",
  948. "metricNamespace": "select",
  949. "resourceGroup": "select",
  950. "resourceName": "select",
  951. "timeGrain": "auto",
  952. "timeGrains": [],
  953. "top": "10"
  954. },
  955. "insightsAnalytics": {
  956. "query": "",
  957. "resultFormat": "time_series"
  958. },
  959. "queryType": "Azure Log Analytics",
  960. "refId": "A",
  961. "subscription": "$sub"
  962. }
  963. ],
  964. "timeFrom": null,
  965. "timeShift": null,
  966. "title": "SQL Wait Category Stats",
  967. "transformations": [
  968. {
  969. "id": "labelsToFields",
  970. "options": {
  971. "valueLabel": "WaitCategory"
  972. }
  973. }
  974. ],
  975. "type": "timeseries"
  976. },
  977. {
  978. "collapsed": false,
  979. "datasource": "$ds",
  980. "gridPos": {
  981. "h": 1,
  982. "w": 24,
  983. "x": 0,
  984. "y": 26
  985. },
  986. "id": 11,
  987. "panels": [],
  988. "title": "Activities",
  989. "type": "row"
  990. },
  991. {
  992. "datasource": "$ds",
  993. "fieldConfig": {
  994. "defaults": {
  995. "color": {
  996. "mode": "palette-classic"
  997. },
  998. "custom": {
  999. "axisLabel": "",
  1000. "axisPlacement": "auto",
  1001. "barAlignment": 0,
  1002. "drawStyle": "line",
  1003. "fillOpacity": 10,
  1004. "gradientMode": "none",
  1005. "hideFrom": {
  1006. "graph": false,
  1007. "legend": false,
  1008. "tooltip": false
  1009. },
  1010. "lineInterpolation": "linear",
  1011. "lineWidth": 1,
  1012. "pointSize": 5,
  1013. "scaleDistribution": {
  1014. "type": "linear"
  1015. },
  1016. "showPoints": "never",
  1017. "spanNulls": true
  1018. },
  1019. "mappings": [],
  1020. "thresholds": {
  1021. "mode": "absolute",
  1022. "steps": [
  1023. {
  1024. "color": "green",
  1025. "value": null
  1026. },
  1027. {
  1028. "color": "red",
  1029. "value": 80
  1030. }
  1031. ]
  1032. },
  1033. "unit": "short"
  1034. },
  1035. "overrides": []
  1036. },
  1037. "gridPos": {
  1038. "h": 7,
  1039. "w": 24,
  1040. "x": 0,
  1041. "y": 27
  1042. },
  1043. "id": 15,
  1044. "maxDataPoints": 20,
  1045. "options": {
  1046. "legend": {
  1047. "calcs": [],
  1048. "displayMode": "list",
  1049. "placement": "bottom"
  1050. },
  1051. "tooltipOptions": {
  1052. "mode": "single"
  1053. }
  1054. },
  1055. "pluginVersion": "7.4.3",
  1056. "targets": [
  1057. {
  1058. "appInsights": {
  1059. "dimension": [],
  1060. "metricName": "select",
  1061. "timeGrain": "auto"
  1062. },
  1063. "azureLogAnalytics": {
  1064. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'Transactions/sec' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') \r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\r\n| project-away SeriesName\n| order by TimeGenerated asc",
  1065. "resultFormat": "time_series",
  1066. "workspace": "$ws"
  1067. },
  1068. "azureMonitor": {
  1069. "aggOptions": [],
  1070. "dimensionFilter": "*",
  1071. "dimensionFilters": [],
  1072. "metricDefinition": "select",
  1073. "metricName": "select",
  1074. "metricNamespace": "select",
  1075. "resourceGroup": "select",
  1076. "resourceName": "select",
  1077. "timeGrain": "auto",
  1078. "timeGrains": [],
  1079. "top": "10"
  1080. },
  1081. "insightsAnalytics": {
  1082. "query": "",
  1083. "resultFormat": "time_series"
  1084. },
  1085. "queryType": "Azure Log Analytics",
  1086. "refId": "A",
  1087. "subscription": "$sub"
  1088. }
  1089. ],
  1090. "timeFrom": null,
  1091. "timeShift": null,
  1092. "title": "Transactions/sec",
  1093. "type": "timeseries"
  1094. },
  1095. {
  1096. "datasource": "$ds",
  1097. "fieldConfig": {
  1098. "defaults": {
  1099. "color": {
  1100. "mode": "palette-classic"
  1101. },
  1102. "custom": {
  1103. "axisLabel": "",
  1104. "axisPlacement": "auto",
  1105. "barAlignment": 0,
  1106. "drawStyle": "line",
  1107. "fillOpacity": 10,
  1108. "gradientMode": "none",
  1109. "hideFrom": {
  1110. "graph": false,
  1111. "legend": false,
  1112. "tooltip": false
  1113. },
  1114. "lineInterpolation": "linear",
  1115. "lineWidth": 1,
  1116. "pointSize": 5,
  1117. "scaleDistribution": {
  1118. "type": "linear"
  1119. },
  1120. "showPoints": "never",
  1121. "spanNulls": true
  1122. },
  1123. "mappings": [],
  1124. "thresholds": {
  1125. "mode": "absolute",
  1126. "steps": [
  1127. {
  1128. "color": "green",
  1129. "value": null
  1130. },
  1131. {
  1132. "color": "red",
  1133. "value": 80
  1134. }
  1135. ]
  1136. },
  1137. "unit": "short"
  1138. },
  1139. "overrides": []
  1140. },
  1141. "gridPos": {
  1142. "h": 8,
  1143. "w": 8,
  1144. "x": 0,
  1145. "y": 34
  1146. },
  1147. "id": 17,
  1148. "options": {
  1149. "legend": {
  1150. "calcs": [],
  1151. "displayMode": "list",
  1152. "placement": "bottom"
  1153. },
  1154. "tooltipOptions": {
  1155. "mode": "single"
  1156. }
  1157. },
  1158. "pluginVersion": "7.4.3",
  1159. "targets": [
  1160. {
  1161. "appInsights": {
  1162. "dimension": [],
  1163. "metricName": "select",
  1164. "timeGrain": "auto"
  1165. },
  1166. "azureLogAnalytics": {
  1167. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'User connections' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\r\n| project-away SeriesName\r\n| order by TimeGenerated asc",
  1168. "resultFormat": "time_series",
  1169. "workspace": "$ws"
  1170. },
  1171. "azureMonitor": {
  1172. "aggOptions": [],
  1173. "dimensionFilter": "*",
  1174. "dimensionFilters": [],
  1175. "metricDefinition": "select",
  1176. "metricName": "select",
  1177. "metricNamespace": "select",
  1178. "resourceGroup": "select",
  1179. "resourceName": "select",
  1180. "timeGrain": "auto",
  1181. "timeGrains": [],
  1182. "top": "10"
  1183. },
  1184. "insightsAnalytics": {
  1185. "query": "",
  1186. "resultFormat": "time_series"
  1187. },
  1188. "queryType": "Azure Log Analytics",
  1189. "refId": "A",
  1190. "subscription": "$sub"
  1191. }
  1192. ],
  1193. "title": "User Connections",
  1194. "transformations": [],
  1195. "type": "timeseries"
  1196. },
  1197. {
  1198. "datasource": "$ds",
  1199. "fieldConfig": {
  1200. "defaults": {
  1201. "color": {
  1202. "mode": "palette-classic"
  1203. },
  1204. "custom": {
  1205. "axisLabel": "",
  1206. "axisPlacement": "auto",
  1207. "barAlignment": 0,
  1208. "drawStyle": "line",
  1209. "fillOpacity": 10,
  1210. "gradientMode": "none",
  1211. "hideFrom": {
  1212. "graph": false,
  1213. "legend": false,
  1214. "tooltip": false
  1215. },
  1216. "lineInterpolation": "linear",
  1217. "lineWidth": 1,
  1218. "pointSize": 5,
  1219. "scaleDistribution": {
  1220. "type": "linear"
  1221. },
  1222. "showPoints": "never",
  1223. "spanNulls": true
  1224. },
  1225. "mappings": [],
  1226. "thresholds": {
  1227. "mode": "absolute",
  1228. "steps": [
  1229. {
  1230. "color": "green",
  1231. "value": null
  1232. }
  1233. ]
  1234. },
  1235. "unit": "none"
  1236. },
  1237. "overrides": []
  1238. },
  1239. "gridPos": {
  1240. "h": 8,
  1241. "w": 8,
  1242. "x": 8,
  1243. "y": 34
  1244. },
  1245. "id": 18,
  1246. "maxDataPoints": 40,
  1247. "options": {
  1248. "legend": {
  1249. "calcs": [],
  1250. "displayMode": "list",
  1251. "placement": "bottom"
  1252. },
  1253. "tooltipOptions": {
  1254. "mode": "single"
  1255. }
  1256. },
  1257. "pluginVersion": "7.4.3",
  1258. "targets": [
  1259. {
  1260. "appInsights": {
  1261. "dimension": [],
  1262. "metricName": "select",
  1263. "timeGrain": "auto"
  1264. },
  1265. "azureLogAnalytics": {
  1266. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'Batch requests/sec' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\n\r\n| project-away SeriesName\r\n| order by TimeGenerated asc",
  1267. "resultFormat": "time_series",
  1268. "workspace": "$ws"
  1269. },
  1270. "azureMonitor": {
  1271. "aggOptions": [],
  1272. "dimensionFilter": "*",
  1273. "dimensionFilters": [],
  1274. "metricDefinition": "select",
  1275. "metricName": "select",
  1276. "metricNamespace": "select",
  1277. "resourceGroup": "select",
  1278. "resourceName": "select",
  1279. "timeGrain": "auto",
  1280. "timeGrains": [],
  1281. "top": "10"
  1282. },
  1283. "insightsAnalytics": {
  1284. "query": "",
  1285. "resultFormat": "time_series"
  1286. },
  1287. "queryType": "Azure Log Analytics",
  1288. "refId": "A",
  1289. "subscription": "$sub"
  1290. }
  1291. ],
  1292. "title": "Batch requests/sec",
  1293. "type": "timeseries"
  1294. },
  1295. {
  1296. "datasource": "$ds",
  1297. "fieldConfig": {
  1298. "defaults": {
  1299. "color": {
  1300. "mode": "palette-classic"
  1301. },
  1302. "custom": {
  1303. "axisLabel": "",
  1304. "axisPlacement": "auto",
  1305. "barAlignment": 0,
  1306. "drawStyle": "line",
  1307. "fillOpacity": 10,
  1308. "gradientMode": "none",
  1309. "hideFrom": {
  1310. "graph": false,
  1311. "legend": false,
  1312. "tooltip": false
  1313. },
  1314. "lineInterpolation": "linear",
  1315. "lineWidth": 1,
  1316. "pointSize": 5,
  1317. "scaleDistribution": {
  1318. "type": "linear"
  1319. },
  1320. "showPoints": "never",
  1321. "spanNulls": true
  1322. },
  1323. "mappings": [],
  1324. "thresholds": {
  1325. "mode": "absolute",
  1326. "steps": [
  1327. {
  1328. "color": "green",
  1329. "value": null
  1330. }
  1331. ]
  1332. },
  1333. "unit": "none"
  1334. },
  1335. "overrides": []
  1336. },
  1337. "gridPos": {
  1338. "h": 8,
  1339. "w": 8,
  1340. "x": 16,
  1341. "y": 34
  1342. },
  1343. "id": 19,
  1344. "maxDataPoints": 40,
  1345. "options": {
  1346. "legend": {
  1347. "calcs": [],
  1348. "displayMode": "list",
  1349. "placement": "bottom"
  1350. },
  1351. "tooltipOptions": {
  1352. "mode": "single"
  1353. }
  1354. },
  1355. "pluginVersion": "7.4.3",
  1356. "targets": [
  1357. {
  1358. "appInsights": {
  1359. "dimension": [],
  1360. "metricName": "select",
  1361. "timeGrain": "auto"
  1362. },
  1363. "azureLogAnalytics": {
  1364. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'SQL compilations/sec' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\n\r\n| project-away SeriesName\r\n| order by TimeGenerated asc",
  1365. "resultFormat": "time_series",
  1366. "workspace": "$ws"
  1367. },
  1368. "azureMonitor": {
  1369. "aggOptions": [],
  1370. "dimensionFilter": "*",
  1371. "dimensionFilters": [],
  1372. "metricDefinition": "select",
  1373. "metricName": "select",
  1374. "metricNamespace": "select",
  1375. "resourceGroup": "select",
  1376. "resourceName": "select",
  1377. "timeGrain": "auto",
  1378. "timeGrains": [],
  1379. "top": "10"
  1380. },
  1381. "insightsAnalytics": {
  1382. "query": "",
  1383. "resultFormat": "time_series"
  1384. },
  1385. "queryType": "Azure Log Analytics",
  1386. "refId": "A",
  1387. "subscription": "$sub"
  1388. }
  1389. ],
  1390. "title": "SQL compilations/sec",
  1391. "type": "timeseries"
  1392. },
  1393. {
  1394. "datasource": "$ds",
  1395. "fieldConfig": {
  1396. "defaults": {
  1397. "color": {
  1398. "mode": "palette-classic"
  1399. },
  1400. "custom": {
  1401. "axisLabel": "",
  1402. "axisPlacement": "auto",
  1403. "barAlignment": 0,
  1404. "drawStyle": "line",
  1405. "fillOpacity": 10,
  1406. "gradientMode": "none",
  1407. "hideFrom": {
  1408. "graph": false,
  1409. "legend": false,
  1410. "tooltip": false
  1411. },
  1412. "lineInterpolation": "linear",
  1413. "lineWidth": 1,
  1414. "pointSize": 5,
  1415. "scaleDistribution": {
  1416. "type": "linear"
  1417. },
  1418. "showPoints": "never",
  1419. "spanNulls": true
  1420. },
  1421. "mappings": [],
  1422. "thresholds": {
  1423. "mode": "absolute",
  1424. "steps": [
  1425. {
  1426. "color": "green",
  1427. "value": null
  1428. }
  1429. ]
  1430. },
  1431. "unit": "none"
  1432. },
  1433. "overrides": []
  1434. },
  1435. "gridPos": {
  1436. "h": 8,
  1437. "w": 8,
  1438. "x": 0,
  1439. "y": 42
  1440. },
  1441. "id": 20,
  1442. "maxDataPoints": 40,
  1443. "options": {
  1444. "legend": {
  1445. "calcs": [],
  1446. "displayMode": "list",
  1447. "placement": "bottom"
  1448. },
  1449. "tooltipOptions": {
  1450. "mode": "single"
  1451. }
  1452. },
  1453. "pluginVersion": "7.4.3",
  1454. "targets": [
  1455. {
  1456. "appInsights": {
  1457. "dimension": [],
  1458. "metricName": "select",
  1459. "timeGrain": "auto"
  1460. },
  1461. "azureLogAnalytics": {
  1462. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'SQL re-compilations/sec' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\n\r\n| project-away SeriesName\r\n| order by TimeGenerated asc",
  1463. "resultFormat": "time_series",
  1464. "workspace": "$ws"
  1465. },
  1466. "azureMonitor": {
  1467. "aggOptions": [],
  1468. "dimensionFilter": "*",
  1469. "dimensionFilters": [],
  1470. "metricDefinition": "select",
  1471. "metricName": "select",
  1472. "metricNamespace": "select",
  1473. "resourceGroup": "select",
  1474. "resourceName": "select",
  1475. "timeGrain": "auto",
  1476. "timeGrains": [],
  1477. "top": "10"
  1478. },
  1479. "insightsAnalytics": {
  1480. "query": "",
  1481. "resultFormat": "time_series"
  1482. },
  1483. "queryType": "Azure Log Analytics",
  1484. "refId": "A",
  1485. "subscription": "$sub"
  1486. }
  1487. ],
  1488. "title": "SQL re-compilations/sec",
  1489. "type": "timeseries"
  1490. },
  1491. {
  1492. "datasource": "$ds",
  1493. "fieldConfig": {
  1494. "defaults": {
  1495. "color": {
  1496. "mode": "palette-classic"
  1497. },
  1498. "custom": {
  1499. "axisLabel": "",
  1500. "axisPlacement": "auto",
  1501. "barAlignment": 0,
  1502. "drawStyle": "line",
  1503. "fillOpacity": 10,
  1504. "gradientMode": "none",
  1505. "hideFrom": {
  1506. "graph": false,
  1507. "legend": false,
  1508. "tooltip": false
  1509. },
  1510. "lineInterpolation": "linear",
  1511. "lineWidth": 1,
  1512. "pointSize": 5,
  1513. "scaleDistribution": {
  1514. "type": "linear"
  1515. },
  1516. "showPoints": "never",
  1517. "spanNulls": true
  1518. },
  1519. "mappings": [],
  1520. "thresholds": {
  1521. "mode": "absolute",
  1522. "steps": [
  1523. {
  1524. "color": "green",
  1525. "value": null
  1526. }
  1527. ]
  1528. },
  1529. "unit": "none"
  1530. },
  1531. "overrides": []
  1532. },
  1533. "gridPos": {
  1534. "h": 8,
  1535. "w": 8,
  1536. "x": 8,
  1537. "y": 42
  1538. },
  1539. "id": 21,
  1540. "options": {
  1541. "legend": {
  1542. "calcs": [],
  1543. "displayMode": "list",
  1544. "placement": "bottom"
  1545. },
  1546. "tooltipOptions": {
  1547. "mode": "single"
  1548. }
  1549. },
  1550. "pluginVersion": "7.4.3",
  1551. "targets": [
  1552. {
  1553. "appInsights": {
  1554. "dimension": [],
  1555. "metricName": "select",
  1556. "timeGrain": "auto"
  1557. },
  1558. "azureLogAnalytics": {
  1559. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'Processes blocked' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\n\r\n| project-away SeriesName\r\n| order by TimeGenerated asc",
  1560. "resultFormat": "time_series",
  1561. "workspace": "$ws"
  1562. },
  1563. "azureMonitor": {
  1564. "aggOptions": [],
  1565. "dimensionFilter": "*",
  1566. "dimensionFilters": [],
  1567. "metricDefinition": "select",
  1568. "metricName": "select",
  1569. "metricNamespace": "select",
  1570. "resourceGroup": "select",
  1571. "resourceName": "select",
  1572. "timeGrain": "auto",
  1573. "timeGrains": [],
  1574. "top": "10"
  1575. },
  1576. "insightsAnalytics": {
  1577. "query": "",
  1578. "resultFormat": "time_series"
  1579. },
  1580. "queryType": "Azure Log Analytics",
  1581. "refId": "A",
  1582. "subscription": "$sub"
  1583. }
  1584. ],
  1585. "title": "Processes blocked",
  1586. "type": "timeseries"
  1587. },
  1588. {
  1589. "datasource": "$ds",
  1590. "fieldConfig": {
  1591. "defaults": {
  1592. "color": {
  1593. "mode": "palette-classic"
  1594. },
  1595. "custom": {
  1596. "axisLabel": "",
  1597. "axisPlacement": "auto",
  1598. "barAlignment": 0,
  1599. "drawStyle": "line",
  1600. "fillOpacity": 10,
  1601. "gradientMode": "none",
  1602. "hideFrom": {
  1603. "graph": false,
  1604. "legend": false,
  1605. "tooltip": false
  1606. },
  1607. "lineInterpolation": "linear",
  1608. "lineWidth": 1,
  1609. "pointSize": 5,
  1610. "scaleDistribution": {
  1611. "type": "linear"
  1612. },
  1613. "showPoints": "never",
  1614. "spanNulls": true
  1615. },
  1616. "mappings": [],
  1617. "thresholds": {
  1618. "mode": "absolute",
  1619. "steps": [
  1620. {
  1621. "color": "green",
  1622. "value": null
  1623. }
  1624. ]
  1625. },
  1626. "unit": "none"
  1627. },
  1628. "overrides": []
  1629. },
  1630. "gridPos": {
  1631. "h": 8,
  1632. "w": 8,
  1633. "x": 16,
  1634. "y": 42
  1635. },
  1636. "id": 22,
  1637. "options": {
  1638. "legend": {
  1639. "calcs": [],
  1640. "displayMode": "list",
  1641. "placement": "bottom"
  1642. },
  1643. "tooltipOptions": {
  1644. "mode": "single"
  1645. }
  1646. },
  1647. "pluginVersion": "7.4.3",
  1648. "targets": [
  1649. {
  1650. "appInsights": {
  1651. "dimension": [],
  1652. "metricName": "select",
  1653. "timeGrain": "auto"
  1654. },
  1655. "azureLogAnalytics": {
  1656. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace =~ 'sqlserver_performance' \r\n| extend Tags = todynamic(Tags)\r\n| extend Name = tostring(Tags.counter), Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\r\n| where Instance == '$SqlInstance' and Database == '$db'\r\n| where Name =~ 'Number of deadlocks/sec' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum = sum(Val) by bin(TimeGenerated, $__interval), SeriesName\n\r\n| project-away SeriesName\r\n| order by TimeGenerated asc",
  1657. "resultFormat": "time_series",
  1658. "workspace": "$ws"
  1659. },
  1660. "azureMonitor": {
  1661. "aggOptions": [],
  1662. "dimensionFilter": "*",
  1663. "dimensionFilters": [],
  1664. "metricDefinition": "select",
  1665. "metricName": "select",
  1666. "metricNamespace": "select",
  1667. "resourceGroup": "select",
  1668. "resourceName": "select",
  1669. "timeGrain": "auto",
  1670. "timeGrains": [],
  1671. "top": "10"
  1672. },
  1673. "insightsAnalytics": {
  1674. "query": "",
  1675. "resultFormat": "time_series"
  1676. },
  1677. "queryType": "Azure Log Analytics",
  1678. "refId": "A",
  1679. "subscription": "$sub"
  1680. }
  1681. ],
  1682. "title": "Number of deadlocks/sec",
  1683. "type": "timeseries"
  1684. },
  1685. {
  1686. "collapsed": false,
  1687. "datasource": "$ds",
  1688. "gridPos": {
  1689. "h": 1,
  1690. "w": 24,
  1691. "x": 0,
  1692. "y": 50
  1693. },
  1694. "id": 24,
  1695. "panels": [],
  1696. "title": "Memory Clerks",
  1697. "type": "row"
  1698. },
  1699. {
  1700. "datasource": "$ds",
  1701. "fieldConfig": {
  1702. "defaults": {
  1703. "color": {
  1704. "mode": "palette-classic"
  1705. },
  1706. "custom": {
  1707. "axisLabel": "",
  1708. "axisPlacement": "auto",
  1709. "barAlignment": 0,
  1710. "drawStyle": "line",
  1711. "fillOpacity": 0,
  1712. "gradientMode": "none",
  1713. "hideFrom": {
  1714. "graph": false,
  1715. "legend": false,
  1716. "tooltip": false
  1717. },
  1718. "lineInterpolation": "linear",
  1719. "lineWidth": 1,
  1720. "pointSize": 5,
  1721. "scaleDistribution": {
  1722. "type": "linear"
  1723. },
  1724. "showPoints": "auto",
  1725. "spanNulls": false
  1726. },
  1727. "mappings": [],
  1728. "thresholds": {
  1729. "mode": "absolute",
  1730. "steps": [
  1731. {
  1732. "color": "green",
  1733. "value": null
  1734. },
  1735. {
  1736. "color": "red",
  1737. "value": 80
  1738. }
  1739. ]
  1740. },
  1741. "unit": "short"
  1742. },
  1743. "overrides": []
  1744. },
  1745. "gridPos": {
  1746. "h": 11,
  1747. "w": 24,
  1748. "x": 0,
  1749. "y": 51
  1750. },
  1751. "id": 26,
  1752. "maxDataPoints": 40,
  1753. "options": {
  1754. "legend": {
  1755. "calcs": [],
  1756. "displayMode": "table",
  1757. "placement": "right"
  1758. },
  1759. "tooltipOptions": {
  1760. "mode": "single"
  1761. }
  1762. },
  1763. "pluginVersion": "7.4.3",
  1764. "targets": [
  1765. {
  1766. "appInsights": {
  1767. "dimension": [],
  1768. "metricName": "select",
  1769. "timeGrain": "auto"
  1770. },
  1771. "azureLogAnalytics": {
  1772. "query": "InsightsMetrics\r\n| where $__timeFilter()\r\n| where Namespace == 'sqlserver_memory_clerks'\r\n| extend Tags = todynamic(Tags)\r\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance), ClerkType = tostring(Tags.clerk_type)\r\n| where Instance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| extend SeriesName = strcat(Instance, '/', Database)\r\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), SeriesName, ClerkType\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\r\n| summarize Sum=sum(Val) by bin(TimeGenerated, $__interval), ClerkType, SeriesName\n| project-away SeriesName\n| order by TimeGenerated asc",
  1773. "resultFormat": "time_series",
  1774. "workspace": "$ws"
  1775. },
  1776. "azureMonitor": {
  1777. "aggOptions": [],
  1778. "dimensionFilter": "*",
  1779. "dimensionFilters": [],
  1780. "metricDefinition": "select",
  1781. "metricName": "select",
  1782. "metricNamespace": "select",
  1783. "resourceGroup": "select",
  1784. "resourceName": "select",
  1785. "timeGrain": "auto",
  1786. "timeGrains": [],
  1787. "top": "10"
  1788. },
  1789. "insightsAnalytics": {
  1790. "query": "",
  1791. "resultFormat": "time_series"
  1792. },
  1793. "queryType": "Azure Log Analytics",
  1794. "refId": "A",
  1795. "subscription": "$sub"
  1796. }
  1797. ],
  1798. "title": "",
  1799. "transformations": [
  1800. {
  1801. "id": "labelsToFields",
  1802. "options": {
  1803. "valueLabel": "ClerkType"
  1804. }
  1805. }
  1806. ],
  1807. "type": "timeseries"
  1808. },
  1809. {
  1810. "collapsed": false,
  1811. "datasource": "$ds",
  1812. "gridPos": {
  1813. "h": 1,
  1814. "w": 24,
  1815. "x": 0,
  1816. "y": 62
  1817. },
  1818. "id": 30,
  1819. "panels": [],
  1820. "title": "Database Space",
  1821. "type": "row"
  1822. },
  1823. {
  1824. "datasource": "$ds",
  1825. "fieldConfig": {
  1826. "defaults": {
  1827. "color": {
  1828. "mode": "thresholds"
  1829. },
  1830. "custom": {},
  1831. "mappings": [],
  1832. "thresholds": {
  1833. "mode": "absolute",
  1834. "steps": [
  1835. {
  1836. "color": "blue",
  1837. "value": null
  1838. }
  1839. ]
  1840. }
  1841. },
  1842. "overrides": [
  1843. {
  1844. "matcher": {
  1845. "id": "byRegexp",
  1846. "options": "^(.* size)"
  1847. },
  1848. "properties": [
  1849. {
  1850. "id": "unit",
  1851. "value": "deckbytes"
  1852. }
  1853. ]
  1854. },
  1855. {
  1856. "matcher": {
  1857. "id": "byName",
  1858. "options": "Percent log used"
  1859. },
  1860. "properties": [
  1861. {
  1862. "id": "unit",
  1863. "value": "percent"
  1864. }
  1865. ]
  1866. }
  1867. ]
  1868. },
  1869. "gridPos": {
  1870. "h": 6,
  1871. "w": 24,
  1872. "x": 0,
  1873. "y": 63
  1874. },
  1875. "id": 32,
  1876. "options": {
  1877. "colorMode": "value",
  1878. "graphMode": "area",
  1879. "justifyMode": "auto",
  1880. "orientation": "auto",
  1881. "reduceOptions": {
  1882. "calcs": ["lastNotNull"],
  1883. "fields": "",
  1884. "values": false
  1885. },
  1886. "text": {},
  1887. "textMode": "auto"
  1888. },
  1889. "pluginVersion": "7.4.3",
  1890. "targets": [
  1891. {
  1892. "appInsights": {
  1893. "dimension": [],
  1894. "metricName": "select",
  1895. "timeGrain": "auto"
  1896. },
  1897. "azureLogAnalytics": {
  1898. "query": "InsightsMetrics \n| where $__timeFilter()\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| summarize \r\n ['Data file(s) size']= avgif(Val, Counter == 'Data File(s) Size (KB)'),\r\n ['Log file(s) size'] = avgif(Val, Counter == 'Log File(s) Size (KB)'),\r\n ['Log file(s) used size'] = avgif(Val, Counter == 'Log File(s) Used Size (KB)'),\r\n ['Percent log used'] = avgif(Val, Counter == 'Percent Log Used')\r\n by SqlInstance, DbInstance",
  1899. "resultFormat": "time_series",
  1900. "workspace": "$ws"
  1901. },
  1902. "azureMonitor": {
  1903. "aggOptions": [],
  1904. "aggregation": "",
  1905. "dimensionFilter": "*",
  1906. "dimensionFilters": [],
  1907. "metricDefinition": "select",
  1908. "metricName": "select",
  1909. "metricNamespace": "select",
  1910. "resourceGroup": "select",
  1911. "resourceName": "select",
  1912. "timeGrain": "",
  1913. "timeGrains": [],
  1914. "top": "10"
  1915. },
  1916. "insightsAnalytics": {
  1917. "query": "",
  1918. "resultFormat": "time_series"
  1919. },
  1920. "queryType": "Azure Log Analytics",
  1921. "refId": "A",
  1922. "subscription": "$sub"
  1923. }
  1924. ],
  1925. "title": "",
  1926. "type": "stat"
  1927. },
  1928. {
  1929. "datasource": "$ds",
  1930. "fieldConfig": {
  1931. "defaults": {
  1932. "color": {
  1933. "mode": "palette-classic"
  1934. },
  1935. "custom": {
  1936. "axisLabel": "",
  1937. "axisPlacement": "auto",
  1938. "barAlignment": -1,
  1939. "drawStyle": "line",
  1940. "fillOpacity": 10,
  1941. "gradientMode": "none",
  1942. "hideFrom": {
  1943. "graph": false,
  1944. "legend": false,
  1945. "tooltip": false
  1946. },
  1947. "lineInterpolation": "linear",
  1948. "lineStyle": {
  1949. "fill": "solid"
  1950. },
  1951. "lineWidth": 1,
  1952. "pointSize": 5,
  1953. "scaleDistribution": {
  1954. "type": "linear"
  1955. },
  1956. "showPoints": "never",
  1957. "spanNulls": true
  1958. },
  1959. "mappings": [],
  1960. "thresholds": {
  1961. "mode": "absolute",
  1962. "steps": [
  1963. {
  1964. "color": "green",
  1965. "value": null
  1966. },
  1967. {
  1968. "color": "red",
  1969. "value": 80
  1970. }
  1971. ]
  1972. },
  1973. "unit": "deckbytes"
  1974. },
  1975. "overrides": []
  1976. },
  1977. "gridPos": {
  1978. "h": 9,
  1979. "w": 12,
  1980. "x": 0,
  1981. "y": 69
  1982. },
  1983. "id": 34,
  1984. "options": {
  1985. "legend": {
  1986. "calcs": [],
  1987. "displayMode": "list",
  1988. "placement": "right"
  1989. },
  1990. "tooltipOptions": {
  1991. "mode": "single"
  1992. }
  1993. },
  1994. "pluginVersion": "7.4.3",
  1995. "targets": [
  1996. {
  1997. "appInsights": {
  1998. "dimension": [],
  1999. "metricName": "select",
  2000. "timeGrain": "auto"
  2001. },
  2002. "azureLogAnalytics": {
  2003. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Data File(s) Size (KB)'\n| summarize Average = round(avg(Val), 2), Max = round(max(Val), 2), Min = round(min(Val), 2), P99th = round(percentile(Val, 99), 2), P95th = round(percentile(Val, 95), 2) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2004. "resultFormat": "time_series",
  2005. "workspace": "$ws"
  2006. },
  2007. "azureMonitor": {
  2008. "aggOptions": [],
  2009. "dimensionFilter": "*",
  2010. "dimensionFilters": [],
  2011. "metricDefinition": "select",
  2012. "metricName": "select",
  2013. "metricNamespace": "select",
  2014. "resourceGroup": "select",
  2015. "resourceName": "select",
  2016. "timeGrain": "auto",
  2017. "timeGrains": [],
  2018. "top": "10"
  2019. },
  2020. "insightsAnalytics": {
  2021. "query": "",
  2022. "resultFormat": "time_series"
  2023. },
  2024. "queryType": "Azure Log Analytics",
  2025. "refId": "A",
  2026. "subscription": "$sub"
  2027. }
  2028. ],
  2029. "timeFrom": null,
  2030. "timeShift": null,
  2031. "title": "Data File(s) Size (KB)",
  2032. "type": "timeseries"
  2033. },
  2034. {
  2035. "datasource": "$ds",
  2036. "fieldConfig": {
  2037. "defaults": {
  2038. "color": {
  2039. "mode": "palette-classic"
  2040. },
  2041. "custom": {
  2042. "axisLabel": "",
  2043. "axisPlacement": "auto",
  2044. "barAlignment": 0,
  2045. "drawStyle": "line",
  2046. "fillOpacity": 10,
  2047. "gradientMode": "none",
  2048. "hideFrom": {
  2049. "graph": false,
  2050. "legend": false,
  2051. "tooltip": false
  2052. },
  2053. "lineInterpolation": "linear",
  2054. "lineWidth": 1,
  2055. "pointSize": 5,
  2056. "scaleDistribution": {
  2057. "type": "linear"
  2058. },
  2059. "showPoints": "never",
  2060. "spanNulls": true
  2061. },
  2062. "mappings": [],
  2063. "thresholds": {
  2064. "mode": "absolute",
  2065. "steps": [
  2066. {
  2067. "color": "green",
  2068. "value": null
  2069. },
  2070. {
  2071. "color": "red",
  2072. "value": 80
  2073. }
  2074. ]
  2075. },
  2076. "unit": "deckbytes"
  2077. },
  2078. "overrides": []
  2079. },
  2080. "gridPos": {
  2081. "h": 9,
  2082. "w": 12,
  2083. "x": 12,
  2084. "y": 69
  2085. },
  2086. "id": 35,
  2087. "options": {
  2088. "legend": {
  2089. "calcs": [],
  2090. "displayMode": "list",
  2091. "placement": "right"
  2092. },
  2093. "tooltipOptions": {
  2094. "mode": "single"
  2095. }
  2096. },
  2097. "pluginVersion": "7.4.3",
  2098. "targets": [
  2099. {
  2100. "appInsights": {
  2101. "dimension": [],
  2102. "metricName": "select",
  2103. "timeGrain": "auto"
  2104. },
  2105. "azureLogAnalytics": {
  2106. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Log File(s) Size (KB)'\n| summarize Average = round(avg(Val), 2), Max = round(max(Val), 2), Min = round(min(Val), 2), P99th = round(percentile(Val, 99), 2), P95th = round(percentile(Val, 95), 2) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2107. "resultFormat": "time_series",
  2108. "workspace": "$ws"
  2109. },
  2110. "azureMonitor": {
  2111. "aggOptions": [],
  2112. "dimensionFilter": "*",
  2113. "dimensionFilters": [],
  2114. "metricDefinition": "select",
  2115. "metricName": "select",
  2116. "metricNamespace": "select",
  2117. "resourceGroup": "select",
  2118. "resourceName": "select",
  2119. "timeGrain": "auto",
  2120. "timeGrains": [],
  2121. "top": "10"
  2122. },
  2123. "insightsAnalytics": {
  2124. "query": "",
  2125. "resultFormat": "time_series"
  2126. },
  2127. "queryType": "Azure Log Analytics",
  2128. "refId": "A",
  2129. "subscription": "$sub"
  2130. }
  2131. ],
  2132. "timeFrom": null,
  2133. "timeShift": null,
  2134. "title": "Log File(s) Size (KB)",
  2135. "type": "timeseries"
  2136. },
  2137. {
  2138. "datasource": "$ds",
  2139. "fieldConfig": {
  2140. "defaults": {
  2141. "color": {
  2142. "mode": "palette-classic"
  2143. },
  2144. "custom": {
  2145. "axisLabel": "",
  2146. "axisPlacement": "auto",
  2147. "barAlignment": -1,
  2148. "drawStyle": "line",
  2149. "fillOpacity": 10,
  2150. "gradientMode": "none",
  2151. "hideFrom": {
  2152. "graph": false,
  2153. "legend": false,
  2154. "tooltip": false
  2155. },
  2156. "lineInterpolation": "linear",
  2157. "lineStyle": {
  2158. "fill": "solid"
  2159. },
  2160. "lineWidth": 1,
  2161. "pointSize": 5,
  2162. "scaleDistribution": {
  2163. "type": "linear"
  2164. },
  2165. "showPoints": "never",
  2166. "spanNulls": true
  2167. },
  2168. "mappings": [],
  2169. "thresholds": {
  2170. "mode": "absolute",
  2171. "steps": [
  2172. {
  2173. "color": "green",
  2174. "value": null
  2175. },
  2176. {
  2177. "color": "red",
  2178. "value": 80
  2179. }
  2180. ]
  2181. },
  2182. "unit": "deckbytes"
  2183. },
  2184. "overrides": []
  2185. },
  2186. "gridPos": {
  2187. "h": 9,
  2188. "w": 12,
  2189. "x": 0,
  2190. "y": 78
  2191. },
  2192. "id": 36,
  2193. "options": {
  2194. "legend": {
  2195. "calcs": [],
  2196. "displayMode": "list",
  2197. "placement": "right"
  2198. },
  2199. "tooltipOptions": {
  2200. "mode": "single"
  2201. }
  2202. },
  2203. "pluginVersion": "7.4.3",
  2204. "targets": [
  2205. {
  2206. "appInsights": {
  2207. "dimension": [],
  2208. "metricName": "select",
  2209. "timeGrain": "auto"
  2210. },
  2211. "azureLogAnalytics": {
  2212. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Log File(s) Used Size (KB)'\n| summarize Average = round(avg(Val), 2), Max = round(max(Val), 2), Min = round(min(Val), 2), P99th = round(percentile(Val, 99), 2), P95th = round(percentile(Val, 95), 2) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2213. "resultFormat": "time_series",
  2214. "workspace": "$ws"
  2215. },
  2216. "azureMonitor": {
  2217. "aggOptions": [],
  2218. "dimensionFilter": "*",
  2219. "dimensionFilters": [],
  2220. "metricDefinition": "select",
  2221. "metricName": "select",
  2222. "metricNamespace": "select",
  2223. "resourceGroup": "select",
  2224. "resourceName": "select",
  2225. "timeGrain": "auto",
  2226. "timeGrains": [],
  2227. "top": "10"
  2228. },
  2229. "insightsAnalytics": {
  2230. "query": "",
  2231. "resultFormat": "time_series"
  2232. },
  2233. "queryType": "Azure Log Analytics",
  2234. "refId": "A",
  2235. "subscription": "$sub"
  2236. }
  2237. ],
  2238. "timeFrom": null,
  2239. "timeShift": null,
  2240. "title": "Log File(s) Used Size (KB)",
  2241. "type": "timeseries"
  2242. },
  2243. {
  2244. "datasource": "$ds",
  2245. "fieldConfig": {
  2246. "defaults": {
  2247. "color": {
  2248. "mode": "palette-classic"
  2249. },
  2250. "custom": {
  2251. "axisLabel": "",
  2252. "axisPlacement": "auto",
  2253. "barAlignment": -1,
  2254. "drawStyle": "line",
  2255. "fillOpacity": 10,
  2256. "gradientMode": "none",
  2257. "hideFrom": {
  2258. "graph": false,
  2259. "legend": false,
  2260. "tooltip": false
  2261. },
  2262. "lineInterpolation": "linear",
  2263. "lineStyle": {
  2264. "fill": "solid"
  2265. },
  2266. "lineWidth": 1,
  2267. "pointSize": 5,
  2268. "scaleDistribution": {
  2269. "type": "linear"
  2270. },
  2271. "showPoints": "never",
  2272. "spanNulls": true
  2273. },
  2274. "mappings": [],
  2275. "thresholds": {
  2276. "mode": "absolute",
  2277. "steps": [
  2278. {
  2279. "color": "green",
  2280. "value": null
  2281. },
  2282. {
  2283. "color": "red",
  2284. "value": 80
  2285. }
  2286. ]
  2287. },
  2288. "unit": "percent"
  2289. },
  2290. "overrides": []
  2291. },
  2292. "gridPos": {
  2293. "h": 9,
  2294. "w": 12,
  2295. "x": 12,
  2296. "y": 78
  2297. },
  2298. "id": 37,
  2299. "options": {
  2300. "legend": {
  2301. "calcs": [],
  2302. "displayMode": "list",
  2303. "placement": "right"
  2304. },
  2305. "tooltipOptions": {
  2306. "mode": "single"
  2307. }
  2308. },
  2309. "pluginVersion": "7.4.3",
  2310. "targets": [
  2311. {
  2312. "appInsights": {
  2313. "dimension": [],
  2314. "metricName": "select",
  2315. "timeGrain": "auto"
  2316. },
  2317. "azureLogAnalytics": {
  2318. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Percent Log Used'\n| summarize Average = round(avg(Val), 2), Max = round(max(Val), 2), Min = round(min(Val), 2), P99th = round(percentile(Val, 99), 2), P95th = round(percentile(Val, 95), 2) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2319. "resultFormat": "time_series",
  2320. "workspace": "$ws"
  2321. },
  2322. "azureMonitor": {
  2323. "aggOptions": [],
  2324. "dimensionFilter": "*",
  2325. "dimensionFilters": [],
  2326. "metricDefinition": "select",
  2327. "metricName": "select",
  2328. "metricNamespace": "select",
  2329. "resourceGroup": "select",
  2330. "resourceName": "select",
  2331. "timeGrain": "auto",
  2332. "timeGrains": [],
  2333. "top": "10"
  2334. },
  2335. "insightsAnalytics": {
  2336. "query": "",
  2337. "resultFormat": "time_series"
  2338. },
  2339. "queryType": "Azure Log Analytics",
  2340. "refId": "A",
  2341. "subscription": "$sub"
  2342. }
  2343. ],
  2344. "timeFrom": null,
  2345. "timeShift": null,
  2346. "title": "Percentage Log used",
  2347. "type": "timeseries"
  2348. },
  2349. {
  2350. "collapsed": false,
  2351. "datasource": "$ds",
  2352. "gridPos": {
  2353. "h": 1,
  2354. "w": 24,
  2355. "x": 0,
  2356. "y": 87
  2357. },
  2358. "id": 39,
  2359. "panels": [],
  2360. "title": "Transactions",
  2361. "type": "row"
  2362. },
  2363. {
  2364. "datasource": "$ds",
  2365. "fieldConfig": {
  2366. "defaults": {
  2367. "color": {
  2368. "mode": "thresholds"
  2369. },
  2370. "custom": {},
  2371. "mappings": [],
  2372. "thresholds": {
  2373. "mode": "absolute",
  2374. "steps": [
  2375. {
  2376. "color": "blue",
  2377. "value": null
  2378. }
  2379. ]
  2380. }
  2381. },
  2382. "overrides": [
  2383. {
  2384. "matcher": {
  2385. "id": "byRegexp",
  2386. "options": "^(.*sec)"
  2387. },
  2388. "properties": [
  2389. {
  2390. "id": "unit",
  2391. "value": "cps"
  2392. }
  2393. ]
  2394. },
  2395. {
  2396. "matcher": {
  2397. "id": "byName",
  2398. "options": "Log Flush Wait Time"
  2399. },
  2400. "properties": [
  2401. {
  2402. "id": "unit",
  2403. "value": "ms"
  2404. }
  2405. ]
  2406. }
  2407. ]
  2408. },
  2409. "gridPos": {
  2410. "h": 6,
  2411. "w": 24,
  2412. "x": 0,
  2413. "y": 88
  2414. },
  2415. "id": 40,
  2416. "maxDataPoints": 40,
  2417. "options": {
  2418. "colorMode": "value",
  2419. "graphMode": "area",
  2420. "justifyMode": "auto",
  2421. "orientation": "auto",
  2422. "reduceOptions": {
  2423. "calcs": ["lastNotNull"],
  2424. "fields": "",
  2425. "values": false
  2426. },
  2427. "text": {},
  2428. "textMode": "auto"
  2429. },
  2430. "pluginVersion": "7.4.3",
  2431. "targets": [
  2432. {
  2433. "appInsights": {
  2434. "dimension": [],
  2435. "metricName": "select",
  2436. "timeGrain": "auto"
  2437. },
  2438. "azureLogAnalytics": {
  2439. "query": "InsightsMetrics \n| where $__timeFilter()\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\r\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| summarize (Start, StartValue) = arg_min(TimeGenerated, Val), (End, EndValue) = arg_max(TimeGenerated, Val) by Counter, Database, SqlInstance, DbInstance, bin(TimeGenerated, $__interval)\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\r\n| summarize \r\n ['Write Transactions/sec'] = avgif(Val, Counter == 'Write Transactions/sec'),\r\n ['Log Flushes/sec'] = avgif(Val, Counter == 'Log Flushes/sec'),\r\n ['Log Bytes Flushed/sec'] = avgif(Val, Counter == 'Log Bytes Flushed/sec'),\r\n ['Log Flush Wait Time'] = avgif(Val, Counter == 'Log Flush Wait Time')\r\n by SqlInstance, DbInstance",
  2440. "resultFormat": "time_series",
  2441. "workspace": "$ws"
  2442. },
  2443. "azureMonitor": {
  2444. "aggOptions": [],
  2445. "aggregation": "",
  2446. "dimensionFilter": "*",
  2447. "dimensionFilters": [],
  2448. "metricDefinition": "select",
  2449. "metricName": "select",
  2450. "metricNamespace": "select",
  2451. "resourceGroup": "select",
  2452. "resourceName": "select",
  2453. "timeGrain": "",
  2454. "timeGrains": [],
  2455. "top": "10"
  2456. },
  2457. "insightsAnalytics": {
  2458. "query": "",
  2459. "resultFormat": "time_series"
  2460. },
  2461. "queryType": "Azure Log Analytics",
  2462. "refId": "A",
  2463. "subscription": "$sub"
  2464. }
  2465. ],
  2466. "title": "",
  2467. "type": "stat"
  2468. },
  2469. {
  2470. "datasource": "$ds",
  2471. "fieldConfig": {
  2472. "defaults": {
  2473. "color": {
  2474. "mode": "palette-classic"
  2475. },
  2476. "custom": {
  2477. "axisLabel": "",
  2478. "axisPlacement": "auto",
  2479. "barAlignment": 0,
  2480. "drawStyle": "line",
  2481. "fillOpacity": 10,
  2482. "gradientMode": "none",
  2483. "hideFrom": {
  2484. "graph": false,
  2485. "legend": false,
  2486. "tooltip": false
  2487. },
  2488. "lineInterpolation": "linear",
  2489. "lineWidth": 1,
  2490. "pointSize": 5,
  2491. "scaleDistribution": {
  2492. "type": "linear"
  2493. },
  2494. "showPoints": "never",
  2495. "spanNulls": true
  2496. },
  2497. "mappings": [],
  2498. "thresholds": {
  2499. "mode": "absolute",
  2500. "steps": [
  2501. {
  2502. "color": "green",
  2503. "value": null
  2504. },
  2505. {
  2506. "color": "red",
  2507. "value": 80
  2508. }
  2509. ]
  2510. },
  2511. "unit": "short"
  2512. },
  2513. "overrides": []
  2514. },
  2515. "gridPos": {
  2516. "h": 8,
  2517. "w": 12,
  2518. "x": 0,
  2519. "y": 94
  2520. },
  2521. "id": 42,
  2522. "maxDataPoints": 20,
  2523. "options": {
  2524. "legend": {
  2525. "calcs": [],
  2526. "displayMode": "list",
  2527. "placement": "bottom"
  2528. },
  2529. "tooltipOptions": {
  2530. "mode": "single"
  2531. }
  2532. },
  2533. "pluginVersion": "7.4.3",
  2534. "targets": [
  2535. {
  2536. "appInsights": {
  2537. "dimension": [],
  2538. "metricName": "select",
  2539. "timeGrain": "auto"
  2540. },
  2541. "azureLogAnalytics": {
  2542. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Write Transactions/sec'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), DbInstance\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum=sum(Val) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2543. "resultFormat": "time_series",
  2544. "workspace": "$ws"
  2545. },
  2546. "azureMonitor": {
  2547. "aggOptions": [],
  2548. "dimensionFilter": "*",
  2549. "dimensionFilters": [],
  2550. "metricDefinition": "select",
  2551. "metricName": "select",
  2552. "metricNamespace": "select",
  2553. "resourceGroup": "select",
  2554. "resourceName": "select",
  2555. "timeGrain": "auto",
  2556. "timeGrains": [],
  2557. "top": "10"
  2558. },
  2559. "insightsAnalytics": {
  2560. "query": "",
  2561. "resultFormat": "time_series"
  2562. },
  2563. "queryType": "Azure Log Analytics",
  2564. "refId": "A",
  2565. "subscription": "$sub"
  2566. }
  2567. ],
  2568. "timeFrom": null,
  2569. "timeShift": null,
  2570. "title": "Write Transactions/sec",
  2571. "type": "timeseries"
  2572. },
  2573. {
  2574. "datasource": "$ds",
  2575. "fieldConfig": {
  2576. "defaults": {
  2577. "color": {
  2578. "mode": "palette-classic"
  2579. },
  2580. "custom": {
  2581. "axisLabel": "",
  2582. "axisPlacement": "auto",
  2583. "barAlignment": 0,
  2584. "drawStyle": "line",
  2585. "fillOpacity": 10,
  2586. "gradientMode": "none",
  2587. "hideFrom": {
  2588. "graph": false,
  2589. "legend": false,
  2590. "tooltip": false
  2591. },
  2592. "lineInterpolation": "linear",
  2593. "lineWidth": 1,
  2594. "pointSize": 5,
  2595. "scaleDistribution": {
  2596. "type": "linear"
  2597. },
  2598. "showPoints": "never",
  2599. "spanNulls": true
  2600. },
  2601. "mappings": [],
  2602. "thresholds": {
  2603. "mode": "absolute",
  2604. "steps": [
  2605. {
  2606. "color": "green",
  2607. "value": null
  2608. },
  2609. {
  2610. "color": "red",
  2611. "value": 80
  2612. }
  2613. ]
  2614. },
  2615. "unit": "short"
  2616. },
  2617. "overrides": []
  2618. },
  2619. "gridPos": {
  2620. "h": 8,
  2621. "w": 12,
  2622. "x": 12,
  2623. "y": 94
  2624. },
  2625. "id": 43,
  2626. "maxDataPoints": 20,
  2627. "options": {
  2628. "legend": {
  2629. "calcs": [],
  2630. "displayMode": "list",
  2631. "placement": "bottom"
  2632. },
  2633. "tooltipOptions": {
  2634. "mode": "single"
  2635. }
  2636. },
  2637. "pluginVersion": "7.4.3",
  2638. "targets": [
  2639. {
  2640. "appInsights": {
  2641. "dimension": [],
  2642. "metricName": "select",
  2643. "timeGrain": "auto"
  2644. },
  2645. "azureLogAnalytics": {
  2646. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Log Flushes/sec'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), DbInstance\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum=sum(Val) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2647. "resultFormat": "time_series",
  2648. "workspace": "$ws"
  2649. },
  2650. "azureMonitor": {
  2651. "aggOptions": [],
  2652. "dimensionFilter": "*",
  2653. "dimensionFilters": [],
  2654. "metricDefinition": "select",
  2655. "metricName": "select",
  2656. "metricNamespace": "select",
  2657. "resourceGroup": "select",
  2658. "resourceName": "select",
  2659. "timeGrain": "auto",
  2660. "timeGrains": [],
  2661. "top": "10"
  2662. },
  2663. "insightsAnalytics": {
  2664. "query": "",
  2665. "resultFormat": "time_series"
  2666. },
  2667. "queryType": "Azure Log Analytics",
  2668. "refId": "A",
  2669. "subscription": "$sub"
  2670. }
  2671. ],
  2672. "timeFrom": null,
  2673. "timeShift": null,
  2674. "title": "Log Flushes/sec",
  2675. "type": "timeseries"
  2676. },
  2677. {
  2678. "datasource": "$ds",
  2679. "fieldConfig": {
  2680. "defaults": {
  2681. "color": {
  2682. "mode": "palette-classic"
  2683. },
  2684. "custom": {
  2685. "axisLabel": "",
  2686. "axisPlacement": "auto",
  2687. "barAlignment": 0,
  2688. "drawStyle": "line",
  2689. "fillOpacity": 10,
  2690. "gradientMode": "none",
  2691. "hideFrom": {
  2692. "graph": false,
  2693. "legend": false,
  2694. "tooltip": false
  2695. },
  2696. "lineInterpolation": "linear",
  2697. "lineWidth": 1,
  2698. "pointSize": 5,
  2699. "scaleDistribution": {
  2700. "type": "linear"
  2701. },
  2702. "showPoints": "never",
  2703. "spanNulls": true
  2704. },
  2705. "mappings": [],
  2706. "thresholds": {
  2707. "mode": "absolute",
  2708. "steps": [
  2709. {
  2710. "color": "green",
  2711. "value": null
  2712. },
  2713. {
  2714. "color": "red",
  2715. "value": 80
  2716. }
  2717. ]
  2718. },
  2719. "unit": "short"
  2720. },
  2721. "overrides": []
  2722. },
  2723. "gridPos": {
  2724. "h": 8,
  2725. "w": 12,
  2726. "x": 0,
  2727. "y": 102
  2728. },
  2729. "id": 44,
  2730. "maxDataPoints": 20,
  2731. "options": {
  2732. "legend": {
  2733. "calcs": [],
  2734. "displayMode": "list",
  2735. "placement": "bottom"
  2736. },
  2737. "tooltipOptions": {
  2738. "mode": "single"
  2739. }
  2740. },
  2741. "pluginVersion": "7.4.3",
  2742. "targets": [
  2743. {
  2744. "appInsights": {
  2745. "dimension": [],
  2746. "metricName": "select",
  2747. "timeGrain": "auto"
  2748. },
  2749. "azureLogAnalytics": {
  2750. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Log Bytes Flushed/sec'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), DbInstance\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum=sum(Val) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2751. "resultFormat": "time_series",
  2752. "workspace": "$ws"
  2753. },
  2754. "azureMonitor": {
  2755. "aggOptions": [],
  2756. "dimensionFilter": "*",
  2757. "dimensionFilters": [],
  2758. "metricDefinition": "select",
  2759. "metricName": "select",
  2760. "metricNamespace": "select",
  2761. "resourceGroup": "select",
  2762. "resourceName": "select",
  2763. "timeGrain": "auto",
  2764. "timeGrains": [],
  2765. "top": "10"
  2766. },
  2767. "insightsAnalytics": {
  2768. "query": "",
  2769. "resultFormat": "time_series"
  2770. },
  2771. "queryType": "Azure Log Analytics",
  2772. "refId": "A",
  2773. "subscription": "$sub"
  2774. }
  2775. ],
  2776. "timeFrom": null,
  2777. "timeShift": null,
  2778. "title": "Log Bytes Flushed/sec",
  2779. "type": "timeseries"
  2780. },
  2781. {
  2782. "datasource": "$ds",
  2783. "fieldConfig": {
  2784. "defaults": {
  2785. "color": {
  2786. "mode": "palette-classic"
  2787. },
  2788. "custom": {
  2789. "axisLabel": "",
  2790. "axisPlacement": "auto",
  2791. "barAlignment": 0,
  2792. "drawStyle": "line",
  2793. "fillOpacity": 10,
  2794. "gradientMode": "none",
  2795. "hideFrom": {
  2796. "graph": false,
  2797. "legend": false,
  2798. "tooltip": false
  2799. },
  2800. "lineInterpolation": "linear",
  2801. "lineWidth": 1,
  2802. "pointSize": 5,
  2803. "scaleDistribution": {
  2804. "type": "linear"
  2805. },
  2806. "showPoints": "never",
  2807. "spanNulls": true
  2808. },
  2809. "mappings": [],
  2810. "thresholds": {
  2811. "mode": "absolute",
  2812. "steps": [
  2813. {
  2814. "color": "green",
  2815. "value": null
  2816. },
  2817. {
  2818. "color": "red",
  2819. "value": 80
  2820. }
  2821. ]
  2822. },
  2823. "unit": "ms"
  2824. },
  2825. "overrides": []
  2826. },
  2827. "gridPos": {
  2828. "h": 8,
  2829. "w": 12,
  2830. "x": 12,
  2831. "y": 102
  2832. },
  2833. "id": 45,
  2834. "maxDataPoints": 20,
  2835. "options": {
  2836. "legend": {
  2837. "calcs": [],
  2838. "displayMode": "list",
  2839. "placement": "bottom"
  2840. },
  2841. "tooltipOptions": {
  2842. "mode": "single"
  2843. }
  2844. },
  2845. "pluginVersion": "7.4.3",
  2846. "targets": [
  2847. {
  2848. "appInsights": {
  2849. "dimension": [],
  2850. "metricName": "select",
  2851. "timeGrain": "auto"
  2852. },
  2853. "azureLogAnalytics": {
  2854. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_performance' and tostring(Tags.object) endswith ':Databases' and tostring(Tags.instance) !~ 'total'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), Counter = tostring(Tags.counter), DbInstance = tostring(Tags.instance)\n| where SqlInstance == '$SqlInstance' and DbInstance == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and Counter == 'Log Flush Wait Time'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), DbInstance\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize Sum=sum(Val) by bin(TimeGenerated, $__interval), DbInstance\n| project-away DbInstance\n| order by TimeGenerated asc",
  2855. "resultFormat": "time_series",
  2856. "workspace": "$ws"
  2857. },
  2858. "azureMonitor": {
  2859. "aggOptions": [],
  2860. "dimensionFilter": "*",
  2861. "dimensionFilters": [],
  2862. "metricDefinition": "select",
  2863. "metricName": "select",
  2864. "metricNamespace": "select",
  2865. "resourceGroup": "select",
  2866. "resourceName": "select",
  2867. "timeGrain": "auto",
  2868. "timeGrains": [],
  2869. "top": "10"
  2870. },
  2871. "insightsAnalytics": {
  2872. "query": "",
  2873. "resultFormat": "time_series"
  2874. },
  2875. "queryType": "Azure Log Analytics",
  2876. "refId": "A",
  2877. "subscription": "$sub"
  2878. }
  2879. ],
  2880. "timeFrom": null,
  2881. "timeShift": null,
  2882. "title": "Log Flush Wait Time",
  2883. "type": "timeseries"
  2884. },
  2885. {
  2886. "collapsed": false,
  2887. "datasource": "$ds",
  2888. "gridPos": {
  2889. "h": 1,
  2890. "w": 24,
  2891. "x": 0,
  2892. "y": 110
  2893. },
  2894. "id": 48,
  2895. "panels": [],
  2896. "title": "Database IO",
  2897. "type": "row"
  2898. },
  2899. {
  2900. "datasource": "$ds",
  2901. "fieldConfig": {
  2902. "defaults": {
  2903. "color": {
  2904. "mode": "thresholds"
  2905. },
  2906. "custom": {},
  2907. "mappings": [],
  2908. "thresholds": {
  2909. "mode": "absolute",
  2910. "steps": [
  2911. {
  2912. "color": "blue",
  2913. "value": null
  2914. }
  2915. ]
  2916. }
  2917. },
  2918. "overrides": [
  2919. {
  2920. "matcher": {
  2921. "id": "byName",
  2922. "options": "LogReadBytes"
  2923. },
  2924. "properties": [
  2925. {
  2926. "id": "unit",
  2927. "value": "bits"
  2928. },
  2929. {
  2930. "id": "displayName",
  2931. "value": "Log read bytes"
  2932. },
  2933. {
  2934. "id": "color",
  2935. "value": {
  2936. "fixedColor": "super-light-blue",
  2937. "mode": "fixed"
  2938. }
  2939. }
  2940. ]
  2941. },
  2942. {
  2943. "matcher": {
  2944. "id": "byName",
  2945. "options": "LogWriteBytes"
  2946. },
  2947. "properties": [
  2948. {
  2949. "id": "unit",
  2950. "value": "bits"
  2951. },
  2952. {
  2953. "id": "displayName",
  2954. "value": "Log write bytes"
  2955. }
  2956. ]
  2957. },
  2958. {
  2959. "matcher": {
  2960. "id": "byName",
  2961. "options": "LogReadLatency"
  2962. },
  2963. "properties": [
  2964. {
  2965. "id": "unit",
  2966. "value": "ms"
  2967. },
  2968. {
  2969. "id": "displayName",
  2970. "value": "Log read latency"
  2971. },
  2972. {
  2973. "id": "color",
  2974. "value": {
  2975. "fixedColor": "super-light-blue",
  2976. "mode": "fixed"
  2977. }
  2978. }
  2979. ]
  2980. },
  2981. {
  2982. "matcher": {
  2983. "id": "byName",
  2984. "options": "LogWriteLatency"
  2985. },
  2986. "properties": [
  2987. {
  2988. "id": "unit",
  2989. "value": "ms"
  2990. },
  2991. {
  2992. "id": "displayName",
  2993. "value": "Log write latency"
  2994. },
  2995. {
  2996. "id": "color",
  2997. "value": {
  2998. "fixedColor": "orange",
  2999. "mode": "fixed"
  3000. }
  3001. }
  3002. ]
  3003. },
  3004. {
  3005. "matcher": {
  3006. "id": "byName",
  3007. "options": "DataReadBytes"
  3008. },
  3009. "properties": [
  3010. {
  3011. "id": "unit",
  3012. "value": "bytes"
  3013. },
  3014. {
  3015. "id": "displayName",
  3016. "value": "Data read bytes"
  3017. },
  3018. {
  3019. "id": "color",
  3020. "value": {
  3021. "fixedColor": "super-light-blue",
  3022. "mode": "fixed"
  3023. }
  3024. }
  3025. ]
  3026. },
  3027. {
  3028. "matcher": {
  3029. "id": "byName",
  3030. "options": "DataWriteBytes"
  3031. },
  3032. "properties": [
  3033. {
  3034. "id": "unit",
  3035. "value": "bytes"
  3036. },
  3037. {
  3038. "id": "displayName",
  3039. "value": "Data write bytes"
  3040. }
  3041. ]
  3042. },
  3043. {
  3044. "matcher": {
  3045. "id": "byName",
  3046. "options": "DataReadLatency"
  3047. },
  3048. "properties": [
  3049. {
  3050. "id": "unit",
  3051. "value": "ms"
  3052. },
  3053. {
  3054. "id": "displayName",
  3055. "value": "Data read latency"
  3056. },
  3057. {
  3058. "id": "color",
  3059. "value": {
  3060. "fixedColor": "super-light-blue",
  3061. "mode": "fixed"
  3062. }
  3063. }
  3064. ]
  3065. },
  3066. {
  3067. "matcher": {
  3068. "id": "byName",
  3069. "options": "DataWriteLatency"
  3070. },
  3071. "properties": [
  3072. {
  3073. "id": "unit",
  3074. "value": "ms"
  3075. },
  3076. {
  3077. "id": "displayName",
  3078. "value": "Data write latency"
  3079. },
  3080. {
  3081. "id": "color",
  3082. "value": {
  3083. "fixedColor": "orange",
  3084. "mode": "fixed"
  3085. }
  3086. }
  3087. ]
  3088. }
  3089. ]
  3090. },
  3091. "gridPos": {
  3092. "h": 6,
  3093. "w": 24,
  3094. "x": 0,
  3095. "y": 111
  3096. },
  3097. "id": 46,
  3098. "options": {
  3099. "colorMode": "value",
  3100. "graphMode": "area",
  3101. "justifyMode": "auto",
  3102. "orientation": "auto",
  3103. "reduceOptions": {
  3104. "calcs": ["lastNotNull"],
  3105. "fields": "",
  3106. "values": false
  3107. },
  3108. "text": {},
  3109. "textMode": "auto"
  3110. },
  3111. "pluginVersion": "7.4.3",
  3112. "targets": [
  3113. {
  3114. "appInsights": {
  3115. "dimension": [],
  3116. "metricName": "select",
  3117. "timeGrain": "auto"
  3118. },
  3119. "azureLogAnalytics": {
  3120. "query": "InsightsMetrics \n| where $__timeFilter()\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\r\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type), FileName = tostring(Tags.logical_filename)\r\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE')\r\n| summarize (Start, StartValue) = arg_min(TimeGenerated, Val), (End, EndValue) = arg_max(TimeGenerated, Val) by Name, Database, SqlInstance, FileType, FileName\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\r\n| summarize\r\n DataReadBytes = sumif(Val, Name == 'read_bytes' and FileType == 'DATA'),\r\n DataWriteBytes = sumif(Val, Name == 'write_bytes' and FileType == 'DATA'),\r\n DataReadLatency = avgif(Val, Name == 'read_latency_ms' and FileType == 'DATA'),\r\n DataWriteLatency = avgif(Val, Name == 'write_latency_ms' and FileType == 'DATA'),\r\n LogReadBytes = sumif(Val, Name == 'read_bytes' and FileType == 'LOG'),\r\n LogWriteBytes = sumif(Val, Name == 'write_bytes' and FileType == 'LOG'),\r\n LogReadLatency = avgif(Val, Name == 'read_latency_ms' and FileType == 'LOG'),\r\n LogWriteLatency = avgif(Val, Name == 'write_latency_ms' and FileType == 'LOG')\r\n by SqlInstance, Database\n | project-reorder LogReadBytes, LogWriteBytes, LogReadLatency, LogWriteLatency, DataReadBytes, DataWriteBytes, DataReadLatency, DataWriteLatency, Database",
  3121. "resultFormat": "time_series",
  3122. "workspace": "$ws"
  3123. },
  3124. "azureMonitor": {
  3125. "aggOptions": [],
  3126. "aggregation": "",
  3127. "dimensionFilter": "*",
  3128. "dimensionFilters": [],
  3129. "metricDefinition": "select",
  3130. "metricName": "select",
  3131. "metricNamespace": "select",
  3132. "resourceGroup": "select",
  3133. "resourceName": "select",
  3134. "timeGrain": "",
  3135. "timeGrains": [],
  3136. "top": "10"
  3137. },
  3138. "insightsAnalytics": {
  3139. "query": "",
  3140. "resultFormat": "time_series"
  3141. },
  3142. "queryType": "Azure Log Analytics",
  3143. "refId": "A",
  3144. "subscription": "$sub"
  3145. }
  3146. ],
  3147. "title": "",
  3148. "type": "stat"
  3149. },
  3150. {
  3151. "datasource": "$ds",
  3152. "fieldConfig": {
  3153. "defaults": {
  3154. "color": {
  3155. "mode": "palette-classic"
  3156. },
  3157. "custom": {
  3158. "axisLabel": "",
  3159. "axisPlacement": "auto",
  3160. "barAlignment": 0,
  3161. "drawStyle": "line",
  3162. "fillOpacity": 10,
  3163. "gradientMode": "none",
  3164. "hideFrom": {
  3165. "graph": false,
  3166. "legend": false,
  3167. "tooltip": false
  3168. },
  3169. "lineInterpolation": "linear",
  3170. "lineWidth": 1,
  3171. "pointSize": 5,
  3172. "scaleDistribution": {
  3173. "type": "linear"
  3174. },
  3175. "showPoints": "never",
  3176. "spanNulls": true
  3177. },
  3178. "mappings": [],
  3179. "thresholds": {
  3180. "mode": "absolute",
  3181. "steps": [
  3182. {
  3183. "color": "green",
  3184. "value": null
  3185. },
  3186. {
  3187. "color": "red",
  3188. "value": 80
  3189. }
  3190. ]
  3191. },
  3192. "unit": "none"
  3193. },
  3194. "overrides": []
  3195. },
  3196. "gridPos": {
  3197. "h": 8,
  3198. "w": 12,
  3199. "x": 0,
  3200. "y": 117
  3201. },
  3202. "id": 49,
  3203. "maxDataPoints": 24,
  3204. "options": {
  3205. "legend": {
  3206. "calcs": [],
  3207. "displayMode": "list",
  3208. "placement": "bottom"
  3209. },
  3210. "tooltipOptions": {
  3211. "mode": "single"
  3212. }
  3213. },
  3214. "pluginVersion": "7.4.3",
  3215. "targets": [
  3216. {
  3217. "appInsights": {
  3218. "dimension": [],
  3219. "metricName": "select",
  3220. "timeGrain": "auto"
  3221. },
  3222. "azureLogAnalytics": {
  3223. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == 'LOG' and Name == 'reads'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  3224. "resultFormat": "time_series",
  3225. "workspace": "$ws"
  3226. },
  3227. "azureMonitor": {
  3228. "aggOptions": [],
  3229. "dimensionFilter": "*",
  3230. "dimensionFilters": [],
  3231. "metricDefinition": "select",
  3232. "metricName": "select",
  3233. "metricNamespace": "select",
  3234. "resourceGroup": "select",
  3235. "resourceName": "select",
  3236. "timeGrain": "auto",
  3237. "timeGrains": [],
  3238. "top": "10"
  3239. },
  3240. "insightsAnalytics": {
  3241. "query": "",
  3242. "resultFormat": "time_series"
  3243. },
  3244. "queryType": "Azure Log Analytics",
  3245. "refId": "A",
  3246. "subscription": "$sub"
  3247. }
  3248. ],
  3249. "timeFrom": null,
  3250. "timeShift": null,
  3251. "title": "Log reads",
  3252. "type": "timeseries"
  3253. },
  3254. {
  3255. "datasource": "$ds",
  3256. "fieldConfig": {
  3257. "defaults": {
  3258. "color": {
  3259. "mode": "palette-classic"
  3260. },
  3261. "custom": {
  3262. "axisLabel": "",
  3263. "axisPlacement": "auto",
  3264. "barAlignment": 0,
  3265. "drawStyle": "line",
  3266. "fillOpacity": 10,
  3267. "gradientMode": "none",
  3268. "hideFrom": {
  3269. "graph": false,
  3270. "legend": false,
  3271. "tooltip": false
  3272. },
  3273. "lineInterpolation": "linear",
  3274. "lineWidth": 1,
  3275. "pointSize": 5,
  3276. "scaleDistribution": {
  3277. "type": "linear"
  3278. },
  3279. "showPoints": "never",
  3280. "spanNulls": true
  3281. },
  3282. "mappings": [],
  3283. "thresholds": {
  3284. "mode": "absolute",
  3285. "steps": [
  3286. {
  3287. "color": "green",
  3288. "value": null
  3289. },
  3290. {
  3291. "color": "red",
  3292. "value": 80
  3293. }
  3294. ]
  3295. },
  3296. "unit": "none"
  3297. },
  3298. "overrides": []
  3299. },
  3300. "gridPos": {
  3301. "h": 8,
  3302. "w": 12,
  3303. "x": 12,
  3304. "y": 117
  3305. },
  3306. "id": 52,
  3307. "maxDataPoints": 24,
  3308. "options": {
  3309. "legend": {
  3310. "calcs": [],
  3311. "displayMode": "list",
  3312. "placement": "bottom"
  3313. },
  3314. "tooltipOptions": {
  3315. "mode": "single"
  3316. }
  3317. },
  3318. "pluginVersion": "7.4.3",
  3319. "targets": [
  3320. {
  3321. "appInsights": {
  3322. "dimension": [],
  3323. "metricName": "select",
  3324. "timeGrain": "auto"
  3325. },
  3326. "azureLogAnalytics": {
  3327. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == 'LOG' and Name == 'writes'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  3328. "resultFormat": "time_series",
  3329. "workspace": "$ws"
  3330. },
  3331. "azureMonitor": {
  3332. "aggOptions": [],
  3333. "dimensionFilter": "*",
  3334. "dimensionFilters": [],
  3335. "metricDefinition": "select",
  3336. "metricName": "select",
  3337. "metricNamespace": "select",
  3338. "resourceGroup": "select",
  3339. "resourceName": "select",
  3340. "timeGrain": "auto",
  3341. "timeGrains": [],
  3342. "top": "10"
  3343. },
  3344. "insightsAnalytics": {
  3345. "query": "",
  3346. "resultFormat": "time_series"
  3347. },
  3348. "queryType": "Azure Log Analytics",
  3349. "refId": "A",
  3350. "subscription": "$sub"
  3351. }
  3352. ],
  3353. "timeFrom": null,
  3354. "timeShift": null,
  3355. "title": "Log writes",
  3356. "type": "timeseries"
  3357. },
  3358. {
  3359. "datasource": "$ds",
  3360. "fieldConfig": {
  3361. "defaults": {
  3362. "color": {
  3363. "mode": "palette-classic"
  3364. },
  3365. "custom": {
  3366. "axisLabel": "",
  3367. "axisPlacement": "auto",
  3368. "barAlignment": 0,
  3369. "drawStyle": "line",
  3370. "fillOpacity": 10,
  3371. "gradientMode": "none",
  3372. "hideFrom": {
  3373. "graph": false,
  3374. "legend": false,
  3375. "tooltip": false
  3376. },
  3377. "lineInterpolation": "linear",
  3378. "lineWidth": 1,
  3379. "pointSize": 5,
  3380. "scaleDistribution": {
  3381. "type": "linear"
  3382. },
  3383. "showPoints": "never",
  3384. "spanNulls": true
  3385. },
  3386. "mappings": [],
  3387. "thresholds": {
  3388. "mode": "absolute",
  3389. "steps": [
  3390. {
  3391. "color": "green",
  3392. "value": null
  3393. },
  3394. {
  3395. "color": "red",
  3396. "value": 80
  3397. }
  3398. ]
  3399. },
  3400. "unit": "bytes"
  3401. },
  3402. "overrides": []
  3403. },
  3404. "gridPos": {
  3405. "h": 8,
  3406. "w": 12,
  3407. "x": 0,
  3408. "y": 125
  3409. },
  3410. "id": 50,
  3411. "maxDataPoints": 24,
  3412. "options": {
  3413. "legend": {
  3414. "calcs": [],
  3415. "displayMode": "list",
  3416. "placement": "bottom"
  3417. },
  3418. "tooltipOptions": {
  3419. "mode": "single"
  3420. }
  3421. },
  3422. "pluginVersion": "7.4.3",
  3423. "targets": [
  3424. {
  3425. "appInsights": {
  3426. "dimension": [],
  3427. "metricName": "select",
  3428. "timeGrain": "auto"
  3429. },
  3430. "azureLogAnalytics": {
  3431. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == 'LOG' and Name == 'read_bytes'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  3432. "resultFormat": "time_series",
  3433. "workspace": "$ws"
  3434. },
  3435. "azureMonitor": {
  3436. "aggOptions": [],
  3437. "dimensionFilter": "*",
  3438. "dimensionFilters": [],
  3439. "metricDefinition": "select",
  3440. "metricName": "select",
  3441. "metricNamespace": "select",
  3442. "resourceGroup": "select",
  3443. "resourceName": "select",
  3444. "timeGrain": "auto",
  3445. "timeGrains": [],
  3446. "top": "10"
  3447. },
  3448. "insightsAnalytics": {
  3449. "query": "",
  3450. "resultFormat": "time_series"
  3451. },
  3452. "queryType": "Azure Log Analytics",
  3453. "refId": "A",
  3454. "subscription": "$sub"
  3455. }
  3456. ],
  3457. "timeFrom": null,
  3458. "timeShift": null,
  3459. "title": "Log read bytes",
  3460. "type": "timeseries"
  3461. },
  3462. {
  3463. "datasource": "$ds",
  3464. "fieldConfig": {
  3465. "defaults": {
  3466. "color": {
  3467. "mode": "palette-classic"
  3468. },
  3469. "custom": {
  3470. "axisLabel": "",
  3471. "axisPlacement": "auto",
  3472. "barAlignment": 0,
  3473. "drawStyle": "line",
  3474. "fillOpacity": 10,
  3475. "gradientMode": "none",
  3476. "hideFrom": {
  3477. "graph": false,
  3478. "legend": false,
  3479. "tooltip": false
  3480. },
  3481. "lineInterpolation": "linear",
  3482. "lineWidth": 1,
  3483. "pointSize": 5,
  3484. "scaleDistribution": {
  3485. "type": "linear"
  3486. },
  3487. "showPoints": "never",
  3488. "spanNulls": true
  3489. },
  3490. "mappings": [],
  3491. "thresholds": {
  3492. "mode": "absolute",
  3493. "steps": [
  3494. {
  3495. "color": "green",
  3496. "value": null
  3497. },
  3498. {
  3499. "color": "red",
  3500. "value": 80
  3501. }
  3502. ]
  3503. },
  3504. "unit": "bytes"
  3505. },
  3506. "overrides": []
  3507. },
  3508. "gridPos": {
  3509. "h": 8,
  3510. "w": 12,
  3511. "x": 12,
  3512. "y": 125
  3513. },
  3514. "id": 56,
  3515. "maxDataPoints": 24,
  3516. "options": {
  3517. "legend": {
  3518. "calcs": [],
  3519. "displayMode": "list",
  3520. "placement": "bottom"
  3521. },
  3522. "tooltipOptions": {
  3523. "mode": "single"
  3524. }
  3525. },
  3526. "pluginVersion": "7.4.3",
  3527. "targets": [
  3528. {
  3529. "appInsights": {
  3530. "dimension": [],
  3531. "metricName": "select",
  3532. "timeGrain": "auto"
  3533. },
  3534. "azureLogAnalytics": {
  3535. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == 'LOG' and Name == 'write_bytes'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  3536. "resultFormat": "time_series",
  3537. "workspace": "$ws"
  3538. },
  3539. "azureMonitor": {
  3540. "aggOptions": [],
  3541. "dimensionFilter": "*",
  3542. "dimensionFilters": [],
  3543. "metricDefinition": "select",
  3544. "metricName": "select",
  3545. "metricNamespace": "select",
  3546. "resourceGroup": "select",
  3547. "resourceName": "select",
  3548. "timeGrain": "auto",
  3549. "timeGrains": [],
  3550. "top": "10"
  3551. },
  3552. "insightsAnalytics": {
  3553. "query": "",
  3554. "resultFormat": "time_series"
  3555. },
  3556. "queryType": "Azure Log Analytics",
  3557. "refId": "A",
  3558. "subscription": "$sub"
  3559. }
  3560. ],
  3561. "timeFrom": null,
  3562. "timeShift": null,
  3563. "title": "Log writebytes",
  3564. "type": "timeseries"
  3565. },
  3566. {
  3567. "datasource": "$ds",
  3568. "fieldConfig": {
  3569. "defaults": {
  3570. "color": {
  3571. "mode": "palette-classic"
  3572. },
  3573. "custom": {
  3574. "axisLabel": "",
  3575. "axisPlacement": "auto",
  3576. "barAlignment": 0,
  3577. "drawStyle": "line",
  3578. "fillOpacity": 10,
  3579. "gradientMode": "none",
  3580. "hideFrom": {
  3581. "graph": false,
  3582. "legend": false,
  3583. "tooltip": false
  3584. },
  3585. "lineInterpolation": "linear",
  3586. "lineWidth": 1,
  3587. "pointSize": 5,
  3588. "scaleDistribution": {
  3589. "type": "linear"
  3590. },
  3591. "showPoints": "never",
  3592. "spanNulls": true
  3593. },
  3594. "mappings": [],
  3595. "thresholds": {
  3596. "mode": "absolute",
  3597. "steps": [
  3598. {
  3599. "color": "green",
  3600. "value": null
  3601. },
  3602. {
  3603. "color": "red",
  3604. "value": 80
  3605. }
  3606. ]
  3607. },
  3608. "unit": "ms"
  3609. },
  3610. "overrides": []
  3611. },
  3612. "gridPos": {
  3613. "h": 8,
  3614. "w": 12,
  3615. "x": 0,
  3616. "y": 133
  3617. },
  3618. "id": 51,
  3619. "maxDataPoints": 24,
  3620. "options": {
  3621. "legend": {
  3622. "calcs": [],
  3623. "displayMode": "list",
  3624. "placement": "bottom"
  3625. },
  3626. "tooltipOptions": {
  3627. "mode": "single"
  3628. }
  3629. },
  3630. "pluginVersion": "7.4.3",
  3631. "targets": [
  3632. {
  3633. "appInsights": {
  3634. "dimension": [],
  3635. "metricName": "select",
  3636. "timeGrain": "auto"
  3637. },
  3638. "azureLogAnalytics": {
  3639. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == 'LOG' and Name == 'read_latency_ms'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Avg\"]=avg(Val) by bin(TimeGenerated, $__interval), Database\n| extend Avg=iff(isnan(Avg), toreal(0), Avg)\n| order by TimeGenerated asc\n| project-away Database",
  3640. "resultFormat": "time_series",
  3641. "workspace": "$ws"
  3642. },
  3643. "azureMonitor": {
  3644. "aggOptions": [],
  3645. "dimensionFilter": "*",
  3646. "dimensionFilters": [],
  3647. "metricDefinition": "select",
  3648. "metricName": "select",
  3649. "metricNamespace": "select",
  3650. "resourceGroup": "select",
  3651. "resourceName": "select",
  3652. "timeGrain": "auto",
  3653. "timeGrains": [],
  3654. "top": "10"
  3655. },
  3656. "insightsAnalytics": {
  3657. "query": "",
  3658. "resultFormat": "time_series"
  3659. },
  3660. "queryType": "Azure Log Analytics",
  3661. "refId": "A",
  3662. "subscription": "$sub"
  3663. }
  3664. ],
  3665. "timeFrom": null,
  3666. "timeShift": null,
  3667. "title": "Log read latency",
  3668. "type": "timeseries"
  3669. },
  3670. {
  3671. "datasource": "$ds",
  3672. "fieldConfig": {
  3673. "defaults": {
  3674. "color": {
  3675. "mode": "palette-classic"
  3676. },
  3677. "custom": {
  3678. "axisLabel": "",
  3679. "axisPlacement": "auto",
  3680. "barAlignment": 0,
  3681. "drawStyle": "line",
  3682. "fillOpacity": 10,
  3683. "gradientMode": "none",
  3684. "hideFrom": {
  3685. "graph": false,
  3686. "legend": false,
  3687. "tooltip": false
  3688. },
  3689. "lineInterpolation": "linear",
  3690. "lineWidth": 1,
  3691. "pointSize": 5,
  3692. "scaleDistribution": {
  3693. "type": "linear"
  3694. },
  3695. "showPoints": "never",
  3696. "spanNulls": true
  3697. },
  3698. "mappings": [],
  3699. "thresholds": {
  3700. "mode": "absolute",
  3701. "steps": [
  3702. {
  3703. "color": "green",
  3704. "value": null
  3705. },
  3706. {
  3707. "color": "red",
  3708. "value": 80
  3709. }
  3710. ]
  3711. },
  3712. "unit": "ms"
  3713. },
  3714. "overrides": []
  3715. },
  3716. "gridPos": {
  3717. "h": 8,
  3718. "w": 12,
  3719. "x": 12,
  3720. "y": 133
  3721. },
  3722. "id": 61,
  3723. "maxDataPoints": 24,
  3724. "options": {
  3725. "legend": {
  3726. "calcs": [],
  3727. "displayMode": "list",
  3728. "placement": "bottom"
  3729. },
  3730. "tooltipOptions": {
  3731. "mode": "single"
  3732. }
  3733. },
  3734. "pluginVersion": "7.4.3",
  3735. "targets": [
  3736. {
  3737. "appInsights": {
  3738. "dimension": [],
  3739. "metricName": "select",
  3740. "timeGrain": "auto"
  3741. },
  3742. "azureLogAnalytics": {
  3743. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == 'LOG' and Name == 'write_latency_ms'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Avg\"]=avg(Val) by bin(TimeGenerated, $__interval), Database\n| extend Avg=iff(isnan(Avg), toreal(0), Avg)\n| order by TimeGenerated asc\n| project-away Database",
  3744. "resultFormat": "time_series",
  3745. "workspace": "$ws"
  3746. },
  3747. "azureMonitor": {
  3748. "aggOptions": [],
  3749. "dimensionFilter": "*",
  3750. "dimensionFilters": [],
  3751. "metricDefinition": "select",
  3752. "metricName": "select",
  3753. "metricNamespace": "select",
  3754. "resourceGroup": "select",
  3755. "resourceName": "select",
  3756. "timeGrain": "auto",
  3757. "timeGrains": [],
  3758. "top": "10"
  3759. },
  3760. "insightsAnalytics": {
  3761. "query": "",
  3762. "resultFormat": "time_series"
  3763. },
  3764. "queryType": "Azure Log Analytics",
  3765. "refId": "A",
  3766. "subscription": "$sub"
  3767. }
  3768. ],
  3769. "timeFrom": null,
  3770. "timeShift": null,
  3771. "title": "Log write latency",
  3772. "type": "timeseries"
  3773. },
  3774. {
  3775. "datasource": "$ds",
  3776. "fieldConfig": {
  3777. "defaults": {
  3778. "color": {
  3779. "mode": "palette-classic"
  3780. },
  3781. "custom": {
  3782. "axisLabel": "",
  3783. "axisPlacement": "auto",
  3784. "barAlignment": 0,
  3785. "drawStyle": "line",
  3786. "fillOpacity": 10,
  3787. "gradientMode": "none",
  3788. "hideFrom": {
  3789. "graph": false,
  3790. "legend": false,
  3791. "tooltip": false
  3792. },
  3793. "lineInterpolation": "linear",
  3794. "lineWidth": 1,
  3795. "pointSize": 5,
  3796. "scaleDistribution": {
  3797. "type": "linear"
  3798. },
  3799. "showPoints": "never",
  3800. "spanNulls": true
  3801. },
  3802. "mappings": [],
  3803. "thresholds": {
  3804. "mode": "absolute",
  3805. "steps": [
  3806. {
  3807. "color": "green",
  3808. "value": null
  3809. },
  3810. {
  3811. "color": "red",
  3812. "value": 80
  3813. }
  3814. ]
  3815. },
  3816. "unit": "none"
  3817. },
  3818. "overrides": []
  3819. },
  3820. "gridPos": {
  3821. "h": 8,
  3822. "w": 12,
  3823. "x": 0,
  3824. "y": 141
  3825. },
  3826. "id": 55,
  3827. "maxDataPoints": 40,
  3828. "options": {
  3829. "legend": {
  3830. "calcs": [],
  3831. "displayMode": "list",
  3832. "placement": "bottom"
  3833. },
  3834. "tooltipOptions": {
  3835. "mode": "single"
  3836. }
  3837. },
  3838. "pluginVersion": "7.4.3",
  3839. "targets": [
  3840. {
  3841. "appInsights": {
  3842. "dimension": [],
  3843. "metricName": "select",
  3844. "timeGrain": "auto"
  3845. },
  3846. "azureLogAnalytics": {
  3847. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend FileTypeFilter = iff(tostring(Tags.measurement_db_type) == 'AzureSQLDB', 'DATA', 'ROWS')\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == FileTypeFilter and Name == 'reads'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  3848. "resultFormat": "time_series",
  3849. "workspace": "$ws"
  3850. },
  3851. "azureMonitor": {
  3852. "aggOptions": [],
  3853. "dimensionFilter": "*",
  3854. "dimensionFilters": [],
  3855. "metricDefinition": "select",
  3856. "metricName": "select",
  3857. "metricNamespace": "select",
  3858. "resourceGroup": "select",
  3859. "resourceName": "select",
  3860. "timeGrain": "auto",
  3861. "timeGrains": [],
  3862. "top": "10"
  3863. },
  3864. "insightsAnalytics": {
  3865. "query": "",
  3866. "resultFormat": "time_series"
  3867. },
  3868. "queryType": "Azure Log Analytics",
  3869. "refId": "A",
  3870. "subscription": "$sub"
  3871. }
  3872. ],
  3873. "timeFrom": null,
  3874. "timeShift": null,
  3875. "title": "Data reads",
  3876. "type": "timeseries"
  3877. },
  3878. {
  3879. "datasource": "$ds",
  3880. "fieldConfig": {
  3881. "defaults": {
  3882. "color": {
  3883. "mode": "palette-classic"
  3884. },
  3885. "custom": {
  3886. "axisLabel": "",
  3887. "axisPlacement": "auto",
  3888. "barAlignment": 0,
  3889. "drawStyle": "line",
  3890. "fillOpacity": 10,
  3891. "gradientMode": "none",
  3892. "hideFrom": {
  3893. "graph": false,
  3894. "legend": false,
  3895. "tooltip": false
  3896. },
  3897. "lineInterpolation": "linear",
  3898. "lineWidth": 1,
  3899. "pointSize": 5,
  3900. "scaleDistribution": {
  3901. "type": "linear"
  3902. },
  3903. "showPoints": "never",
  3904. "spanNulls": true
  3905. },
  3906. "mappings": [],
  3907. "thresholds": {
  3908. "mode": "absolute",
  3909. "steps": [
  3910. {
  3911. "color": "green",
  3912. "value": null
  3913. },
  3914. {
  3915. "color": "red",
  3916. "value": 80
  3917. }
  3918. ]
  3919. },
  3920. "unit": "none"
  3921. },
  3922. "overrides": []
  3923. },
  3924. "gridPos": {
  3925. "h": 8,
  3926. "w": 12,
  3927. "x": 12,
  3928. "y": 141
  3929. },
  3930. "id": 58,
  3931. "maxDataPoints": 40,
  3932. "options": {
  3933. "legend": {
  3934. "calcs": [],
  3935. "displayMode": "list",
  3936. "placement": "bottom"
  3937. },
  3938. "tooltipOptions": {
  3939. "mode": "single"
  3940. }
  3941. },
  3942. "pluginVersion": "7.4.3",
  3943. "targets": [
  3944. {
  3945. "appInsights": {
  3946. "dimension": [],
  3947. "metricName": "select",
  3948. "timeGrain": "auto"
  3949. },
  3950. "azureLogAnalytics": {
  3951. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend FileTypeFilter = iff(tostring(Tags.measurement_db_type) == 'AzureSQLDB', 'DATA', 'ROWS')\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == FileTypeFilter and Name == 'writes'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  3952. "resultFormat": "time_series",
  3953. "workspace": "$ws"
  3954. },
  3955. "azureMonitor": {
  3956. "aggOptions": [],
  3957. "dimensionFilter": "*",
  3958. "dimensionFilters": [],
  3959. "metricDefinition": "select",
  3960. "metricName": "select",
  3961. "metricNamespace": "select",
  3962. "resourceGroup": "select",
  3963. "resourceName": "select",
  3964. "timeGrain": "auto",
  3965. "timeGrains": [],
  3966. "top": "10"
  3967. },
  3968. "insightsAnalytics": {
  3969. "query": "",
  3970. "resultFormat": "time_series"
  3971. },
  3972. "queryType": "Azure Log Analytics",
  3973. "refId": "A",
  3974. "subscription": "$sub"
  3975. }
  3976. ],
  3977. "timeFrom": null,
  3978. "timeShift": null,
  3979. "title": "Data writes",
  3980. "type": "timeseries"
  3981. },
  3982. {
  3983. "datasource": "$ds",
  3984. "fieldConfig": {
  3985. "defaults": {
  3986. "color": {
  3987. "mode": "palette-classic"
  3988. },
  3989. "custom": {
  3990. "axisLabel": "",
  3991. "axisPlacement": "auto",
  3992. "barAlignment": 0,
  3993. "drawStyle": "line",
  3994. "fillOpacity": 10,
  3995. "gradientMode": "none",
  3996. "hideFrom": {
  3997. "graph": false,
  3998. "legend": false,
  3999. "tooltip": false
  4000. },
  4001. "lineInterpolation": "linear",
  4002. "lineWidth": 1,
  4003. "pointSize": 5,
  4004. "scaleDistribution": {
  4005. "type": "linear"
  4006. },
  4007. "showPoints": "never",
  4008. "spanNulls": true
  4009. },
  4010. "mappings": [],
  4011. "thresholds": {
  4012. "mode": "absolute",
  4013. "steps": [
  4014. {
  4015. "color": "green",
  4016. "value": null
  4017. },
  4018. {
  4019. "color": "red",
  4020. "value": 80
  4021. }
  4022. ]
  4023. },
  4024. "unit": "bytes"
  4025. },
  4026. "overrides": []
  4027. },
  4028. "gridPos": {
  4029. "h": 8,
  4030. "w": 12,
  4031. "x": 0,
  4032. "y": 149
  4033. },
  4034. "id": 57,
  4035. "maxDataPoints": 24,
  4036. "options": {
  4037. "legend": {
  4038. "calcs": [],
  4039. "displayMode": "list",
  4040. "placement": "bottom"
  4041. },
  4042. "tooltipOptions": {
  4043. "mode": "single"
  4044. }
  4045. },
  4046. "pluginVersion": "7.4.3",
  4047. "targets": [
  4048. {
  4049. "appInsights": {
  4050. "dimension": [],
  4051. "metricName": "select",
  4052. "timeGrain": "auto"
  4053. },
  4054. "azureLogAnalytics": {
  4055. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend FileTypeFilter = iff(tostring(Tags.measurement_db_type) == 'AzureSQLDB', 'DATA', 'ROWS')\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == FileTypeFilter and Name == 'read_bytes'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  4056. "resultFormat": "time_series",
  4057. "workspace": "$ws"
  4058. },
  4059. "azureMonitor": {
  4060. "aggOptions": [],
  4061. "dimensionFilter": "*",
  4062. "dimensionFilters": [],
  4063. "metricDefinition": "select",
  4064. "metricName": "select",
  4065. "metricNamespace": "select",
  4066. "resourceGroup": "select",
  4067. "resourceName": "select",
  4068. "timeGrain": "auto",
  4069. "timeGrains": [],
  4070. "top": "10"
  4071. },
  4072. "insightsAnalytics": {
  4073. "query": "",
  4074. "resultFormat": "time_series"
  4075. },
  4076. "queryType": "Azure Log Analytics",
  4077. "refId": "A",
  4078. "subscription": "$sub"
  4079. }
  4080. ],
  4081. "timeFrom": null,
  4082. "timeShift": null,
  4083. "title": "Data read bytes",
  4084. "type": "timeseries"
  4085. },
  4086. {
  4087. "datasource": "$ds",
  4088. "fieldConfig": {
  4089. "defaults": {
  4090. "color": {
  4091. "mode": "palette-classic"
  4092. },
  4093. "custom": {
  4094. "axisLabel": "",
  4095. "axisPlacement": "auto",
  4096. "barAlignment": 0,
  4097. "drawStyle": "line",
  4098. "fillOpacity": 10,
  4099. "gradientMode": "none",
  4100. "hideFrom": {
  4101. "graph": false,
  4102. "legend": false,
  4103. "tooltip": false
  4104. },
  4105. "lineInterpolation": "linear",
  4106. "lineWidth": 1,
  4107. "pointSize": 5,
  4108. "scaleDistribution": {
  4109. "type": "linear"
  4110. },
  4111. "showPoints": "never",
  4112. "spanNulls": true
  4113. },
  4114. "mappings": [],
  4115. "thresholds": {
  4116. "mode": "absolute",
  4117. "steps": [
  4118. {
  4119. "color": "green",
  4120. "value": null
  4121. },
  4122. {
  4123. "color": "red",
  4124. "value": 80
  4125. }
  4126. ]
  4127. },
  4128. "unit": "bytes"
  4129. },
  4130. "overrides": []
  4131. },
  4132. "gridPos": {
  4133. "h": 8,
  4134. "w": 12,
  4135. "x": 12,
  4136. "y": 149
  4137. },
  4138. "id": 59,
  4139. "maxDataPoints": 24,
  4140. "options": {
  4141. "legend": {
  4142. "calcs": [],
  4143. "displayMode": "list",
  4144. "placement": "bottom"
  4145. },
  4146. "tooltipOptions": {
  4147. "mode": "single"
  4148. }
  4149. },
  4150. "pluginVersion": "7.4.3",
  4151. "targets": [
  4152. {
  4153. "appInsights": {
  4154. "dimension": [],
  4155. "metricName": "select",
  4156. "timeGrain": "auto"
  4157. },
  4158. "azureLogAnalytics": {
  4159. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend FileTypeFilter = iff(tostring(Tags.measurement_db_type) == 'AzureSQLDB', 'DATA', 'ROWS')\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == FileTypeFilter and Name == 'write_bytes'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Sum\"]=sum(Val) by bin(TimeGenerated, $__interval), Database\n| order by TimeGenerated asc\n| project-away Database",
  4160. "resultFormat": "time_series",
  4161. "workspace": "$ws"
  4162. },
  4163. "azureMonitor": {
  4164. "aggOptions": [],
  4165. "dimensionFilter": "*",
  4166. "dimensionFilters": [],
  4167. "metricDefinition": "select",
  4168. "metricName": "select",
  4169. "metricNamespace": "select",
  4170. "resourceGroup": "select",
  4171. "resourceName": "select",
  4172. "timeGrain": "auto",
  4173. "timeGrains": [],
  4174. "top": "10"
  4175. },
  4176. "insightsAnalytics": {
  4177. "query": "",
  4178. "resultFormat": "time_series"
  4179. },
  4180. "queryType": "Azure Log Analytics",
  4181. "refId": "A",
  4182. "subscription": "$sub"
  4183. }
  4184. ],
  4185. "timeFrom": null,
  4186. "timeShift": null,
  4187. "title": "Data write bytes",
  4188. "type": "timeseries"
  4189. },
  4190. {
  4191. "datasource": "$ds",
  4192. "fieldConfig": {
  4193. "defaults": {
  4194. "color": {
  4195. "mode": "palette-classic"
  4196. },
  4197. "custom": {
  4198. "axisLabel": "",
  4199. "axisPlacement": "auto",
  4200. "barAlignment": 0,
  4201. "drawStyle": "line",
  4202. "fillOpacity": 10,
  4203. "gradientMode": "none",
  4204. "hideFrom": {
  4205. "graph": false,
  4206. "legend": false,
  4207. "tooltip": false
  4208. },
  4209. "lineInterpolation": "linear",
  4210. "lineWidth": 1,
  4211. "pointSize": 5,
  4212. "scaleDistribution": {
  4213. "type": "linear"
  4214. },
  4215. "showPoints": "never",
  4216. "spanNulls": true
  4217. },
  4218. "mappings": [],
  4219. "thresholds": {
  4220. "mode": "absolute",
  4221. "steps": [
  4222. {
  4223. "color": "green",
  4224. "value": null
  4225. },
  4226. {
  4227. "color": "red",
  4228. "value": 80
  4229. }
  4230. ]
  4231. },
  4232. "unit": "ms"
  4233. },
  4234. "overrides": []
  4235. },
  4236. "gridPos": {
  4237. "h": 8,
  4238. "w": 12,
  4239. "x": 0,
  4240. "y": 157
  4241. },
  4242. "id": 54,
  4243. "maxDataPoints": 24,
  4244. "options": {
  4245. "legend": {
  4246. "calcs": [],
  4247. "displayMode": "list",
  4248. "placement": "bottom"
  4249. },
  4250. "tooltipOptions": {
  4251. "mode": "single"
  4252. }
  4253. },
  4254. "pluginVersion": "7.4.3",
  4255. "targets": [
  4256. {
  4257. "appInsights": {
  4258. "dimension": [],
  4259. "metricName": "select",
  4260. "timeGrain": "auto"
  4261. },
  4262. "azureLogAnalytics": {
  4263. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend FileTypeFilter = iff(tostring(Tags.measurement_db_type) == 'AzureSQLDB', 'DATA', 'ROWS')\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == FileTypeFilter and Name == 'read_latency_ms'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Avg\"]=avg(Val) by bin(TimeGenerated, $__interval), Database\n| extend Avg=iff(isnan(Avg), toreal(0), Avg)\n| order by TimeGenerated asc\n| project-away Database",
  4264. "resultFormat": "time_series",
  4265. "workspace": "$ws"
  4266. },
  4267. "azureMonitor": {
  4268. "aggOptions": [],
  4269. "dimensionFilter": "*",
  4270. "dimensionFilters": [],
  4271. "metricDefinition": "select",
  4272. "metricName": "select",
  4273. "metricNamespace": "select",
  4274. "resourceGroup": "select",
  4275. "resourceName": "select",
  4276. "timeGrain": "auto",
  4277. "timeGrains": [],
  4278. "top": "10"
  4279. },
  4280. "insightsAnalytics": {
  4281. "query": "",
  4282. "resultFormat": "time_series"
  4283. },
  4284. "queryType": "Azure Log Analytics",
  4285. "refId": "A",
  4286. "subscription": "$sub"
  4287. }
  4288. ],
  4289. "timeFrom": null,
  4290. "timeShift": null,
  4291. "title": "Data read latency",
  4292. "type": "timeseries"
  4293. },
  4294. {
  4295. "datasource": "$ds",
  4296. "fieldConfig": {
  4297. "defaults": {
  4298. "color": {
  4299. "mode": "palette-classic"
  4300. },
  4301. "custom": {
  4302. "axisLabel": "",
  4303. "axisPlacement": "auto",
  4304. "barAlignment": 0,
  4305. "drawStyle": "line",
  4306. "fillOpacity": 10,
  4307. "gradientMode": "none",
  4308. "hideFrom": {
  4309. "graph": false,
  4310. "legend": false,
  4311. "tooltip": false
  4312. },
  4313. "lineInterpolation": "linear",
  4314. "lineWidth": 1,
  4315. "pointSize": 5,
  4316. "scaleDistribution": {
  4317. "type": "linear"
  4318. },
  4319. "showPoints": "never",
  4320. "spanNulls": true
  4321. },
  4322. "mappings": [],
  4323. "thresholds": {
  4324. "mode": "absolute",
  4325. "steps": [
  4326. {
  4327. "color": "green",
  4328. "value": null
  4329. },
  4330. {
  4331. "color": "red",
  4332. "value": 80
  4333. }
  4334. ]
  4335. },
  4336. "unit": "ms"
  4337. },
  4338. "overrides": []
  4339. },
  4340. "gridPos": {
  4341. "h": 8,
  4342. "w": 12,
  4343. "x": 12,
  4344. "y": 157
  4345. },
  4346. "id": 60,
  4347. "maxDataPoints": 24,
  4348. "options": {
  4349. "legend": {
  4350. "calcs": [],
  4351. "displayMode": "list",
  4352. "placement": "bottom"
  4353. },
  4354. "tooltipOptions": {
  4355. "mode": "single"
  4356. }
  4357. },
  4358. "pluginVersion": "7.4.3",
  4359. "targets": [
  4360. {
  4361. "appInsights": {
  4362. "dimension": [],
  4363. "metricName": "select",
  4364. "timeGrain": "auto"
  4365. },
  4366. "azureLogAnalytics": {
  4367. "query": "InsightsMetrics\n| where $__timeFilter(TimeGenerated)\n| extend Tags = todynamic(Tags)\r\n| where Namespace =~ 'sqlserver_database_io'\n| extend FileTypeFilter = iff(tostring(Tags.measurement_db_type) == 'AzureSQLDB', 'DATA', 'ROWS')\n| extend Database = tostring(Tags.database_name), SqlInstance = tostring(Tags.sql_instance), FileType = tostring(Tags.file_type)\n| extend Database = iff(isempty(Database), SqlInstance, Database)\n| where SqlInstance == '$SqlInstance' and Database == '$db' and Tags.replica_updateability == iff('$Replica' == 'secondary', 'READ_ONLY', 'READ_WRITE') and FileType == FileTypeFilter and Name == 'write_latency_ms'\n| summarize (StartTime, StartValue) = arg_min(TimeGenerated, Val), (EndTime, EndValue) = arg_max(TimeGenerated, Val) by bin(TimeGenerated, $__interval), Database\r\n| extend Val = iff(EndValue >= StartValue, EndValue - StartValue, real(null))\n| summarize [\"Avg\"]=avg(Val) by bin(TimeGenerated, $__interval), Database\n| extend Avg=iff(isnan(Avg), toreal(0), Avg)\n| order by TimeGenerated asc\n| project-away Database",
  4368. "resultFormat": "time_series",
  4369. "workspace": "$ws"
  4370. },
  4371. "azureMonitor": {
  4372. "aggOptions": [],
  4373. "dimensionFilter": "*",
  4374. "dimensionFilters": [],
  4375. "metricDefinition": "select",
  4376. "metricName": "select",
  4377. "metricNamespace": "select",
  4378. "resourceGroup": "select",
  4379. "resourceName": "select",
  4380. "timeGrain": "auto",
  4381. "timeGrains": [],
  4382. "top": "10"
  4383. },
  4384. "insightsAnalytics": {
  4385. "query": "",
  4386. "resultFormat": "time_series"
  4387. },
  4388. "queryType": "Azure Log Analytics",
  4389. "refId": "A",
  4390. "subscription": "$sub"
  4391. }
  4392. ],
  4393. "timeFrom": null,
  4394. "timeShift": null,
  4395. "title": "Data write latency",
  4396. "type": "timeseries"
  4397. }
  4398. ],
  4399. "refresh": false,
  4400. "schemaVersion": 27,
  4401. "style": "dark",
  4402. "tags": [],
  4403. "templating": {
  4404. "list": [
  4405. {
  4406. "current": {},
  4407. "description": null,
  4408. "error": null,
  4409. "hide": 0,
  4410. "includeAll": false,
  4411. "label": "Data Source",
  4412. "multi": false,
  4413. "name": "ds",
  4414. "options": [],
  4415. "query": "grafana-azure-monitor-datasource",
  4416. "queryValue": "",
  4417. "refresh": 1,
  4418. "regex": "",
  4419. "skipUrlSync": false,
  4420. "type": "datasource"
  4421. },
  4422. {
  4423. "allValue": null,
  4424. "current": {},
  4425. "datasource": "$ds",
  4426. "definition": "subscriptions()",
  4427. "description": null,
  4428. "error": null,
  4429. "hide": 0,
  4430. "includeAll": false,
  4431. "label": "Subscription",
  4432. "multi": false,
  4433. "name": "sub",
  4434. "options": [],
  4435. "query": "subscriptions()",
  4436. "refresh": 2,
  4437. "regex": "",
  4438. "skipUrlSync": false,
  4439. "sort": 0,
  4440. "tagValuesQuery": "",
  4441. "tags": [],
  4442. "tagsQuery": "",
  4443. "type": "query",
  4444. "useTags": false
  4445. },
  4446. {
  4447. "allValue": null,
  4448. "current": {},
  4449. "datasource": "$ds",
  4450. "definition": "Workspaces($sub)",
  4451. "description": null,
  4452. "error": null,
  4453. "hide": 0,
  4454. "includeAll": false,
  4455. "label": "Workspace",
  4456. "multi": false,
  4457. "name": "ws",
  4458. "options": [],
  4459. "query": "Workspaces($sub)",
  4460. "refresh": 2,
  4461. "regex": "",
  4462. "skipUrlSync": false,
  4463. "sort": 0,
  4464. "tagValuesQuery": "",
  4465. "tags": [],
  4466. "tagsQuery": "",
  4467. "type": "query",
  4468. "useTags": false
  4469. },
  4470. {
  4471. "allValue": null,
  4472. "current": {},
  4473. "datasource": "$ds",
  4474. "definition": "workspace(\"$ws\").InsightsMetrics | where Namespace contains 'sqlserver_server_properties' and Name == 'engine_edition'\n| extend Tags = todynamic(Tags)\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\n| where Val == 5 | summarize by Instance\n| project value = Instance, label = Instance, selected = true",
  4475. "description": null,
  4476. "error": null,
  4477. "hide": 0,
  4478. "includeAll": false,
  4479. "label": "Server",
  4480. "multi": false,
  4481. "name": "SqlInstance",
  4482. "options": [],
  4483. "query": "workspace(\"$ws\").InsightsMetrics | where Namespace contains 'sqlserver_server_properties' and Name == 'engine_edition'\n| extend Tags = todynamic(Tags)\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\n| where Val == 5 | summarize by Instance\n| project value = Instance, label = Instance, selected = true",
  4484. "refresh": 1,
  4485. "regex": "",
  4486. "skipUrlSync": false,
  4487. "sort": 0,
  4488. "tagValuesQuery": "",
  4489. "tags": [],
  4490. "tagsQuery": "",
  4491. "type": "query",
  4492. "useTags": false
  4493. },
  4494. {
  4495. "allValue": null,
  4496. "current": {},
  4497. "datasource": "$ds",
  4498. "definition": "workspace(\"$ws\").InsightsMetrics\n| where Namespace contains 'sqlserver_server_properties' and Name == 'uptime'\n| extend Tags = todynamic(Tags)\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance), Replica = tostring(iff(Tags.replica_updateability == 'READ_WRITE', 'primary', 'secondary'))\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\n| where Instance =~ '$SqlInstance'\n| distinct Database",
  4499. "description": null,
  4500. "error": null,
  4501. "hide": 0,
  4502. "includeAll": false,
  4503. "label": "Database",
  4504. "multi": false,
  4505. "name": "db",
  4506. "options": [],
  4507. "query": "workspace(\"$ws\").InsightsMetrics\n| where Namespace contains 'sqlserver_server_properties' and Name == 'uptime'\n| extend Tags = todynamic(Tags)\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance), Replica = tostring(iff(Tags.replica_updateability == 'READ_WRITE', 'primary', 'secondary'))\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\n| where Instance =~ '$SqlInstance'\n| distinct Database",
  4508. "refresh": 1,
  4509. "regex": "",
  4510. "skipUrlSync": false,
  4511. "sort": 0,
  4512. "tagValuesQuery": "",
  4513. "tags": [],
  4514. "tagsQuery": "",
  4515. "type": "query",
  4516. "useTags": false
  4517. },
  4518. {
  4519. "allValue": null,
  4520. "current": {},
  4521. "datasource": "$ds",
  4522. "definition": "workspace(\"$ws\").InsightsMetrics\n| extend Tags = todynamic(Tags)\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\n| where Instance == '$SqlInstance'\n| where Namespace =~ 'sqlserver_azure_db_resource_stats'\n| summarize by value = tostring(iff(Tags.replica_updateability == 'READ_WRITE', 'primary', 'secondary'))\n| project value, label = value, selected = true\n| order by label asc",
  4523. "description": null,
  4524. "error": null,
  4525. "hide": 0,
  4526. "includeAll": false,
  4527. "label": null,
  4528. "multi": false,
  4529. "name": "Replica",
  4530. "options": [],
  4531. "query": "workspace(\"$ws\").InsightsMetrics\n| extend Tags = todynamic(Tags)\n| extend Database = tostring(Tags.database_name), Instance = tostring(Tags.sql_instance)\n| extend DatabaseKey = iff(Database == Instance, Database, strcat(Database, ' on ', Instance))\n| where Instance == '$SqlInstance'\n| where Namespace =~ 'sqlserver_azure_db_resource_stats'\n| summarize by value = tostring(iff(Tags.replica_updateability == 'READ_WRITE', 'primary', 'secondary'))\n| project value, label = value, selected = true\n| order by label asc",
  4532. "refresh": 1,
  4533. "regex": "",
  4534. "skipUrlSync": false,
  4535. "sort": 0,
  4536. "tagValuesQuery": "",
  4537. "tags": [],
  4538. "tagsQuery": "",
  4539. "type": "query",
  4540. "useTags": false
  4541. }
  4542. ]
  4543. },
  4544. "time": {
  4545. "from": "now-4h",
  4546. "to": "now"
  4547. },
  4548. "timepicker": {},
  4549. "timezone": "browser",
  4550. "title": "Azure / Insights / SQL Database",
  4551. "uid": "cIld6iqMk",
  4552. "version": 69
  4553. }