{"id":190,"date":"2025-12-02T09:17:45","date_gmt":"2025-12-02T09:17:45","guid":{"rendered":"https:\/\/dataguide.tech\/?p=190"},"modified":"2025-12-02T09:17:45","modified_gmt":"2025-12-02T09:17:45","slug":"how-to-build-automated-monitoring-alerts-for-microsoft-fabric","status":"publish","type":"post","link":"https:\/\/dataguide.tech\/index.php\/2025\/12\/02\/how-to-build-automated-monitoring-alerts-for-microsoft-fabric\/","title":{"rendered":"How to Build Automated Monitoring Alerts for Microsoft Fabric"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>If you&#8217;ve been working with Microsoft Fabric in production environments, you&#8217;ve probably faced this critical question: &#8220;How can we monitor our pipelines, notebooks, and processes with automated notifications when something goes wrong?&#8221;<\/p>\n\n\n\n<p>Here&#8217;s the thing\u2014as of now, there&#8217;s no built-in functionality in Microsoft Fabric that fully addresses this need. The recently announced Workspace Monitoring doesn&#8217;t cover dataflows, pipelines, or notebooks. For many teams, this is actually a &#8220;hard stop&#8221; for moving to production, since they can&#8217;t react quickly and efficiently when failures happen.<\/p>\n\n\n\n<p>Since this question keeps coming up with every Fabric implementation, I decided to dig deeper and explore what&#8217;s currently possible. While there&#8217;s no official documentation, I found a way to tap into the same data that powers Fabric&#8217;s Monitoring Hub. Let me show you how.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Discovering the Monitoring API<\/h2>\n\n\n\n<p>The first step was understanding how the Monitoring Hub actually works under the hood. To do this, I used the browser&#8217;s developer tools to peek at what&#8217;s happening behind the scenes.<\/p>\n\n\n\n<p>Here&#8217;s what I did: I opened Developer Tools (hit F12 in most browsers), switched to the Network tab, and started recording all API calls. Then I opened the Monitoring Hub tab in Fabric:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2331\" height=\"816\" src=\"http:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image.png\" alt=\"\" class=\"wp-image-192\" srcset=\"https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image.png 2331w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-300x105.png 300w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1024x358.png 1024w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-768x269.png 768w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1536x538.png 1536w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-2048x717.png 2048w\" sizes=\"auto, (max-width: 2331px) 100vw, 2331px\" \/><\/figure>\n\n\n\n<p>As you can see in the screenshot, several API calls are being made. The highlighted one is particularly interesting\u2014this is the actual endpoint that Monitoring Hub uses to fetch execution data.<\/p>\n\n\n\n<p>When you click into the details of that API call, you&#8217;ll see something like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"2118\" height=\"1199\" src=\"http:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35.png\" alt=\"\" class=\"wp-image-196\" srcset=\"https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35.png 2118w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35-300x170.png 300w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35-1024x580.png 1024w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35-768x435.png 768w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35-1536x870.png 1536w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.34.35-2048x1159.png 2048w\" sizes=\"auto, (max-width: 2118px) 100vw, 2118px\" \/><\/figure>\n<\/div>\n\n\n<p>The highlighted sections show the key information you&#8217;ll need to construct your own REST API call to the same endpoint. This means you can access exactly the same data that Monitoring Hub displays\u2014programmatically!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding the API Payload<\/h2>\n\n\n\n<p>Now, let&#8217;s look at the &#8220;Payload&#8221; tab to see what parameters are being sent:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"2133\" height=\"275\" src=\"http:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1.png\" alt=\"\" class=\"wp-image-195\" srcset=\"https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1.png 2133w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1-300x39.png 300w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1-1024x132.png 1024w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1-768x99.png 768w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1-1536x198.png 1536w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/image-1-2048x264.png 2048w\" sizes=\"auto, (max-width: 2133px) 100vw, 2133px\" \/><\/figure>\n<\/div>\n\n\n<p>Here are the three main parameters you&#8217;ll work with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>limit<\/strong> &#8211; Sets the maximum number of rows the API will return<\/li>\n\n\n\n<li><strong style=\"font-size: revert;\">endTime<\/strong><span style=\"font-size: revert;\"> &#8211; Defaults to the current time; filters executions by their Start Time<\/span><\/li>\n\n\n\n<li><strong style=\"font-size: revert;\">startTime<\/strong><span style=\"font-size: revert;\"> &#8211; Defaults to 1970-01-01; filters executions by their Start Time<\/span><\/li>\n<\/ul>\n\n\n\n<p><strong>Heads up:<\/strong> You can discover additional parameters by modifying filters in the Monitoring Hub and checking the subsequent requests. For example, when I filtered to show only failed processes:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"2320\" height=\"1230\" src=\"http:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51.png\" alt=\"\" class=\"wp-image-194\" srcset=\"https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51.png 2320w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51-300x159.png 300w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51-1024x543.png 1024w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51-768x407.png 768w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51-1536x814.png 1536w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.43.51-2048x1086.png 2048w\" sizes=\"auto, (max-width: 2320px) 100vw, 2320px\" \/><\/figure>\n<\/div>\n\n\n<p>The payload revealed a new parameter called <code>status<\/code> with values: 3, 5, 7, 8. These represent different failure statuses. I don&#8217;t know the exact difference between them since there&#8217;s no official Microsoft documentation for this API\u2014but the key point is that we can modify the API call to filter the output we need.<\/p>\n\n\n\n<p>You can experiment with different filters in the Monitoring Hub and check the Network tab to see what parameters get added. This way, you can craft the perfect API call for your specific monitoring needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Data Can You Access?<\/h2>\n\n\n\n<p>The API response gives you everything displayed in the Monitoring Hub:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1068\" height=\"726\" src=\"http:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.49.42.png\" alt=\"\" class=\"wp-image-193\" srcset=\"https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.49.42.png 1068w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.49.42-300x204.png 300w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.49.42-1024x696.png 1024w, https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Zrzut_ekranu_2025-02-4_o_10.49.42-768x522.png 768w\" sizes=\"auto, (max-width: 1068px) 100vw, 1068px\" \/><\/figure>\n<\/div>\n\n\n<p>This includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Object IDs and workspace IDs<\/li>\n\n\n\n<li>Start and end times<\/li>\n\n\n\n<li>Job owner information<\/li>\n\n\n\n<li>Execution status<\/li>\n\n\n\n<li>The <code>serviceExceptionJson<\/code> field\u2014which contains detailed error information<\/li>\n<\/ul>\n\n\n\n<p>This last field is particularly valuable for understanding what went wrong in a failed execution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Automating Monitoring with Python<\/h2>\n\n\n\n<p>Ok, now that I knew what the Monitoring Hub uses behind the scenes, I wanted to automate the whole process using Fabric Notebooks. My goal was simple: load the execution logs into a Lakehouse table, then use that data to send email or Teams notifications when issues occur.<\/p>\n\n\n\n<p><strong>Below you can find the script I created.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Import Libraries<\/h3>\n\n\n\n<p>Start by importing the necessary libraries: <code>requests<\/code> for making HTTP requests, <code>pandas<\/code> for data manipulation, and <code>json<\/code> for handling JSON data.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#a6accd;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#252937;color:#969dc4\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#a6accd;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Import all libraries\nimport requests\nimport pandas as pd\nimport json<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki poimandres\" style=\"background-color: #1b1e28\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #767C9DB0; font-style: italic\"># Import all libraries<\/span><\/span>\n<span class=\"line\"><span style=\"color: #5DE4C7\">import<\/span><span style=\"color: #A6ACCD\"> requests<\/span><\/span>\n<span class=\"line\"><span style=\"color: #5DE4C7\">import<\/span><span style=\"color: #A6ACCD\"> pandas <\/span><span style=\"color: #5DE4C7\">as<\/span><span style=\"color: #A6ACCD\"> pd<\/span><\/span>\n<span class=\"line\"><span style=\"color: #5DE4C7\">import<\/span><span style=\"color: #A6ACCD\"> json<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Get Authorization Token<\/h3>\n\n\n\n<p>Obtain an authorization token using the <code>mssparkutils.credentials.getToken<\/code> method. This token is essential for accessing the API.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#252937;color:#969dc4\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#a6accd;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Get Authorization Token\ntoken = mssparkutils.credentials.getToken(\"https:\/\/api.fabric.microsoft.com\")<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki poimandres\" style=\"background-color: #1b1e28\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #767C9DB0; font-style: italic\"># Get Authorization Token<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">token <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> mssparkutils.credentials.getToken(<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">https:\/\/api.fabric.microsoft.com<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Prepare API Request<\/h3>\n\n\n\n<p>Define the URL and parameters for the API request. The parameters include filters for the data we want to retrieve, such as the time range and status codes.<\/p>\n\n\n\n<p><strong>Please note:<\/strong> You can adjust these parameters based on your needs by checking the payload from the Network details as we discussed earlier.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#252937;color:#969dc4\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#a6accd;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Prepare API request details\nurl = \"{PUT YOUR URL}\"\nparams = {\n    \"limit\": 10000, # Maximum number of rows to be retrieved\n    \"endTime\": f\"2025-02-04T09:42:28.484Z\", # Limiting range of StartTime of the Job\n    \"startTime\": f\"1970-01-01T00:00:00.000Z\", # Limiting range of StartTime of the Job\n    \"status\":\"3,5,7,8\", # Filterout only error rows\n    \"Accept\": \"application\/json\", # Do not manipulate to get json output\n    \"accept-encoding\": \"gzip, deflate, br, zstd\", # Do not manipulate\n    \"activityid\": \"d6678b61-1c72-4e43-9498-54b715064543\", # It could be any GUID\n    \"accept-language\": \"en-US,en;q=0.9\" # Do not manipulate\n}\nheaders = {\n    \"Authorization\": f\"Bearer {token}\" # Authorization using the generated token\n}\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki poimandres\" style=\"background-color: #1b1e28\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #767C9DB0; font-style: italic\"># Prepare API request details<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">url <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">{PUT YOUR URL}<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">params <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">limit<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #5DE4C7\">10000<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Maximum number of rows to be retrieved<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">endTime<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #91B4D5\">f<\/span><span style=\"color: #5DE4C7\">&quot;2025-02-04T09:42:28.484Z&quot;<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Limiting range of StartTime of the Job<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">startTime<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #91B4D5\">f<\/span><span style=\"color: #5DE4C7\">&quot;1970-01-01T00:00:00.000Z&quot;<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Limiting range of StartTime of the Job<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">status<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">:<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">3,5,7,8<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Filterout only error rows<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">Accept<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">application\/json<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Do not manipulate to get json output<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">accept-encoding<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">gzip, deflate, br, zstd<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Do not manipulate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">activityid<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">d6678b61-1c72-4e43-9498-54b715064543<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">, <\/span><span style=\"color: #767C9DB0; font-style: italic\"># It could be any GUID<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">accept-language<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">en-US,en;q=0.9<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\"> <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Do not manipulate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">headers <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">    <\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #5DE4C7\">Authorization<\/span><span style=\"color: #A6ACCD\">&quot;<\/span><span style=\"color: #A6ACCD\">: <\/span><span style=\"color: #91B4D5\">f<\/span><span style=\"color: #5DE4C7\">&quot;Bearer <\/span><span style=\"color: #5DE4C7\">{<\/span><span style=\"color: #A6ACCD\">token<\/span><span style=\"color: #5DE4C7\">}<\/span><span style=\"color: #5DE4C7\">&quot;<\/span><span style=\"color: #A6ACCD\"> <\/span><span style=\"color: #767C9DB0; font-style: italic\"># Authorization using the generated token<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Execute API Call<\/h3>\n\n\n\n<p>Make the API call using the <code>requests.get<\/code> method and store the response.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#252937;color:#969dc4\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#a6accd;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Execute API call and save a response to variable\nresponse = requests.get(url, headers=headers, params=params)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki poimandres\" style=\"background-color: #1b1e28\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #767C9DB0; font-style: italic\"># Execute API call and save a response to variable<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">response <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> requests.get(url, <\/span><span style=\"color: #E4F0FB\">headers<\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\">headers, <\/span><span style=\"color: #E4F0FB\">params<\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\">params)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Process JSON Data<\/h3>\n\n\n\n<p>Extract the JSON data from the response and convert it into a pandas DataFrame for easy manipulation and analysis.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#252937;color:#969dc4\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#a6accd;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Take json data from response and save it to variable\ndata = response.json()\n# Open JSON and save it as pandas DF\ndf = pd.json_normalize(data)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki poimandres\" style=\"background-color: #1b1e28\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #767C9DB0; font-style: italic\"># Take json data from response and save it to variable<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">data <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> response.json()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #767C9DB0; font-style: italic\"># Open JSON and save it as pandas DF<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">df <\/span><span style=\"color: #91B4D5\">=<\/span><span style=\"color: #A6ACCD\"> pd.json_normalize(data)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p>That&#8217;s it for Part 1! You now have a DataFrame with all your execution logs, which you can load into a Lakehouse table, analyze, or use as the foundation for alerting.<\/p>\n\n\n\n<p>In Part 2, I&#8217;ll show you how to build on this foundation to create automated notifications via email and Teams, plus how to set up reporting dashboards for your monitoring data.<\/p>\n\n\n\n<p><strong>Want to see Part 2?<\/strong> Let me know in the comments if you&#8217;re interested in the notification and reporting setup\u2014I&#8217;d love to hear what specific monitoring scenarios you&#8217;re dealing with!<\/p>\n\n\n\n<p><strong>Happy monitoring!<\/strong><\/p>\n\n\n<p><!-- \/wp:post-content --><\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction If you&#8217;ve been working with Microsoft Fabric in production environments, you&#8217;ve probably faced this critical question: &#8220;How can we monitor our pipelines, notebooks, and processes with automated notifications when something goes wrong?&#8221; Here&#8217;s the thing\u2014as of now, there&#8217;s no built-in functionality in Microsoft Fabric that fully addresses this need. The recently announced Workspace Monitoring&#8230;<\/p>\n","protected":false},"author":1,"featured_media":214,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"show","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,9],"tags":[11,13,10,12],"class_list":["post-190","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administration","category-microsoft-fabric","tag-administration","tag-fabric","tag-microsoftfabric","tag-monitoring"],"jetpack_featured_media_url":"https:\/\/dataguide.tech\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_xnvf35xnvf35xnvf-e1764664901920.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":17,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/posts\/190\/revisions\/225"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/media\/214"}],"wp:attachment":[{"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dataguide.tech\/index.php\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}