Grafana dashboard: Avid Pay SLO Monitoring
Description: Testing import AvidPay SLO Monitoring dashboard


{
  "__inputs": [
    {
      "name": "DS_AZURE_MONITOR - SAAS_INFRA",
      "label": "Azure Monitor - SaaS_Infra",
      "description": "",
      "type": "datasource",
      "pluginId": "grafana-azure-monitor-datasource",
      "pluginName": "Azure Monitor"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.3.2"
    },
    {
      "type": "datasource",
      "id": "grafana-azure-monitor-datasource",
      "name": "Azure Monitor",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "datasource",
        "uid": "grafana"
      },
      "description": "",
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 39,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "WIKI Document - https://dev.azure.com/avidxchange/technology-references/_wiki/wikis/tech-refs/37861/AvidPay-SLO-Dashboard <br/>\n<font size=\"3px\" color=\"green\"><b>CS-Creation-001 -</b></font> 100% of all check payments queued for batch processing are successfully transformed and corresponding output files are staged for delivery to the check printer(s) by 10PM each business day <br/>\n<font size=\"3px\" color=\"green\"><b>CS-Creation-002 -</b></font> 100% of all check payments queued for batch processing are successfully transformed and corresponding output files are staged for delivery to the check printer(s) by 10PM each business day <br/>\n<font size=\"3px\" color=\"green\"><b>CS-Creation-003 -</b></font> 100% of all check payments queued for batch processing are successfully transformed and corresponding output files are staged for delivery to the check printer(s) by 9PM each business day <br/>\n\n<font size=\"3px\" color=\"green\"><b>FS-Aggregation-001 -</b></font> ​​100% of all payments in ACH Requested that are eligible for Aggregation and require ONST approval are moved to the correct payment status by 5PM each business day <br/>\n<font size=\"3px\" color=\"green\"><b>FS-Aggregation-002 -</b></font> ​​100% of all payments in ACH Requested that are eligible for Aggregation and do not require ONST approval are moved to the correct payment status by 7PM each business day <br/>\n<font size=\"3px\" color=\"green\"><b>FS-Bai2-001 -</b></font> ​​100% of all BAI2 files are consumed by the BAI2 Parser by 6:30AM Monday - Friday <br/>\n<font size=\"3px\" color=\"green\"><b>FS-Bai2-002 -</b></font> 100% of all BAI2 files consumed by the BAI2 parser are sent to the Enterprise Reconciliation Tool by 7:00AM  Tool Monday - Friday <br/>\n<font size=\"3px\" color=\"green\"><b>FS-Bai2-003 -</b></font> 100% of all ACH and Check Clearing requests are processed by 10AM Monday - Friday <br/>\n<font size=\"3px\" color=\"green\"><b>FS-Remittance-001 -</b></font> 100% of all remittance emails are successfully delivered to customers by 9AM each business day <br/>\n\n<font size=\"3px\" color=\"green\"><b>VCS-Creation-001 -</b></font> 100% of all virtual cards queued on each business day are created by midnight each business day <br/>\n<font size=\"3px\" color=\"green\"><b>VCS-Delivery-002 -</b></font> 100% of all virtual cards created on each business day are e-mailed to suppliers by 2PM the following business day <br/>\n<font size=\"3px\" color=\"green\"><b>VCS-WEXTransaction-001 -</b></font> 100% of WEX transaction are inserted into AvidPay database by 3 AM EST <br/>",
        "mode": "markdown"
      },
      "pluginVersion": "9.3.2",
      "title": "AvidPay Daily Monitoring SLO Dashboard - Overview",
      "type": "text"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "id": 12,
      "panels": [],
      "title": "Check Services",
      "type": "row"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 0,
        "y": 5
      },
      "id": 20,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  | where $__timeFilter(timestamp)\r\n  | where isnotempty(customDimensions)\r\n  //filter for custom events for CottonWood \r\n  | where name has \"Cottonwood:BatchGenerating\" or name has \"Cottonwood:BatchCompleted\"\r\n  | extend d = parse_json(customDimensions)\r\n  //Converting the UTC datetime to EST datetime\r\n  | extend  CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n    //Get the count of BatchGenerating events\r\n    CountGenerating=countif(name has \"Cottonwood:BatchGenerating\"),\r\n\t//Get the count of BatchGenerating comppleted\r\n    CountCompleted=countif(name has \"Cottonwood:BatchCompleted\"),\r\n\t//Get the count of BatchCompleted past 10 pm EST\r\n    CountPast10PM=countif(name has \"Cottonwood:BatchCompleted\" and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 22)\r\n\t//Case condition will check \r\n\t//Check for Count of BatchGenerating or BatchCompleted is not 0\r\n\t//BatchGenerating count is same as BatchCompleted\r\n\t//Check for any batch completed after 10pm EST  \r\n  | project PercentCompletedBefore10PM= case(CountPast10PM !=0, 1-(CountPast10PM/todouble(CountCompleted)), CountGenerating != CountCompleted, 1-(CountCompleted/todouble(CountGenerating)), CountGenerating ==0,0.0,CountCompleted==0,0.0, 1.0) ",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/Ax-Ae1-Payment-Legacy-Rg/providers/Microsoft.Insights/components/Ax-Ae1-Pr-CheckLegacy-Insights"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "CS-Creation-001 - %Files Delivered",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 5,
        "y": 5
      },
      "id": 40,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^PercentCompletedAfter10PM$/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  | where $__timeFilter(timestamp)\r\n  //filter for custom events for SunGard\r\n  | where name has \"CheckBatchProcessor:CheckFileCreated\" or name has \"CheckBatchProcessor:CheckFileSent\" and customDimensions.CheckPrinterId == 1\r\n  | extend d = parse_json(customDimensions)\r\n  //Converting the UTC datetime to EST datetime\r\n  | extend  CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n  //Get the count of check file created for SunGard\r\n  CountQueued=countif(name has \"CheckBatchProcessor:CheckFileCreated\" and d.CheckPrinterId == 1),\r\n  //Get the count of check file sent for SunGard \r\n  CountSent=countif(name has \"CheckBatchProcessor:CheckFileSent\" and d.CheckPrinterId == 1),\r\n  //Get the count of check file sent for SunGard post 10 PM EST\r\n  CountPast10PM=countif(name has \"CheckBatchProcessor:CheckFileSent\" and d.CheckPrinterId == 1 and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 22)\r\n  //Case condition will check \r\n\t//Check for Count of Check File Created or Check File Sent is not 0\r\n\t//Check file created count is same as Check File sent\r\n\t//Check for any check file sent after 10pm EST  \r\n| project PercentCompletedAfter10PM=case(CountPast10PM !=0, 1-(CountPast10PM/todouble(CountSent)), CountQueued != CountSent,(CountSent/todouble(CountQueued)),CountSent ==0,0.0,1.0)",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Legacy-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Legacy-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "CS-Creation-002 - %Files Delivered",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 10,
        "y": 5
      },
      "id": 41,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^PercentCompletedAfter10PM$/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  | where $__timeFilter(timestamp)\r\n    //filter for custom events for StrongRoom\r\n  | where name has \"CheckBatchProcessor:CheckFileCreated\" or name has \"CheckBatchProcessor:CheckFileSent\" and customDimensions.CheckPrinterId == 2\r\n  | extend d = parse_json(customDimensions)\r\n  //Converting the UTC datetime to EST datetime\r\n  | extend  CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n   //Get the count of check file created for StrongRoom\r\n  CountQueued=countif(name has \"CheckBatchProcessor:CheckFileCreated\" and d.CheckPrinterId == 2),\r\n   //Get the count of check file sent for StrongRoom\r\n  CountSent=countif(name has \"CheckBatchProcessor:CheckFileSent\" and d.CheckPrinterId == 2),\r\n    //Get the count of check file sent for SunGard post 9 PM EST\r\n  CountPast9PM=countif(name has \"CheckBatchProcessor:CheckFileSent\" and d.CheckPrinterId == 2 and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 21)\r\n   //Case condition will check \r\n\t//Check for Count of Check File Created or Check File Sent is not 0\r\n\t//Check file created count is same as Check File sent\r\n\t//Check for any check file sent after 9pm EST \r\n| project PercentCompletedAfter9PM=case(CountPast9PM !=0, 1-(CountPast9PM/todouble(CountSent)), CountQueued != CountSent, 1-(CountSent/todouble(CountQueued)), CountSent ==0, 0.0, 1.0)",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Legacy-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Legacy-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "CS-Creation-003 - %Files Delivered",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 4,
      "panels": [],
      "title": "Funding & Settlement",
      "type": "row"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "red",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "PercentBatchApprovalCompleted"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 0,
        "y": 9
      },
      "id": 31,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n| extend d = parse_json(customDimensions)\r\n //filter for custom events for Aggregation Batch Creation and Created. And filter custom dimensions for AggregationType Approval\r\n| where name has \"Aggregation:Batch:Creation:Created\" and d.AggregationType == \"Approval\"\r\n  //Converting the UTC datetime to EST datetime\r\n| extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.Date),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n| summarize \r\n   //Get the count of Aggregation Creation and Created events. AggregationType Approval custom dimensions events\r\n   TotalBatchCreated = countif(name has \"Aggregation:Batch:Creation:Created\" and d.AggregationType == \"Approval\"),\r\n   //Get the count of  Aggregation Creation and Created events. AggregationType Approval custom dimensions events and ONST approval are moved to the correct payment status by 5PM \r\n   TotalBatchCreatedPast5PM = countif(name has \"Aggregation:Batch:Creation:Created\" and d.AggregationType == \"Approval\" and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 17)\r\n\t//Case condition will check \r\n\t//Check for Count of Batch Created and AggregationType Approval is not 0\r\n  //Check for any batch created after 05pm EST\r\n| project PercentBatchApprovalCompleted = case(TotalBatchCreatedPast5PM != 0, 1-(TotalBatchCreatedPast5PM/todouble(TotalBatchCreated)), TotalBatchCreated == 0,0.0,1.0) ",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Legacy-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Legacy-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-Aggregation-001 - %ApprovalACHRequestedAggregation",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": ""
              },
              {
                "color": "#EAB839",
                "value": ""
              },
              {
                "color": "green",
                "value": ""
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "PercentBatchAutoApprovalCompleted"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 9,
        "x": 8,
        "y": 9
      },
      "id": 33,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n| extend d = parse_json(customDimensions)\r\n  //filter for custom events for Aggregation Batch Creation and Created. And filter custom dimensions for AggregationType Non Approval\r\n| where name has \"Aggregation:Batch:Creation:Created\" and d.AggregationType == \"Non Approval\"\r\n  //Converting the UTC datetime to EST datetime\r\n| extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.Date),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n| summarize\r\n   //Get the count of Aggregation Creation and Created events. AggregationType Non Approval custom dimensions events\r\n   TotalBatchCreated = countif(name has \"Aggregation:Batch:Creation:Created\" and d.AggregationType == \"Non Approval\"),\r\n   //Get the count of  Aggregation Creation and Created events. AggregationType Approval custom dimensions events and ONST approval are moved to the correct payment status by 5PM\r\n   TotalBatchCreatedPast7PM = countif(name has \"Aggregation:Batch:Creation:Created\" and d.AggregationType == \"Non Approval\" and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 19)\r\n   //Case condition will check \r\n\t//Check for Count of Batch Created and AggregationType Non Approval is not 0\r\n   //Check for any batch created past 07pm EST\r\n| project PercentBatchAutoApprovalCompleted = case(TotalBatchCreatedPast7PM  != 0, 1-(TotalBatchCreatedPast7PM/todouble(TotalBatchCreated)), TotalBatchCreated == 0, 0.0,1.0) ",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Legacy-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Legacy-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-Aggregation-002 - %AutoApprovalACHRequestedAggregation",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Percent"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 0,
        "y": 12
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "app(\"AX-Ae1-Pr-Payment-Hub-INSIGHTS\").customEvents\r\n| where $__timeFilter(timestamp)\r\n  //filter for custom events for BeginParsingFile. And filter custom dimensions for FileName: BOA_AVDC(Bank of america), AVDC_BAIPD(Fifth Third) and OldNSpd(KeyBank)\r\n| where name == \"Bai2Parser:BeginParsingFile\" and ((toupper(customDimensions.FileName) contains \"BOA_AVDC\") \r\nor (toupper(customDimensions.FileName) contains \"AVDC_BAIPD\") or (customDimensions.FileName contains \"OldNSpd\"))\r\n| extend d = parse_json(customDimensions)\r\n            //Converting the UTC datetime to EST datetime\r\n            | extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n            //Converting the UTC datetime to EST datetime for timestamp\r\n            | extend TransmissionDateTime = format_datetime(datetime_utc_to_local(timestamp, \"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n            //get the Expected Date for all BAI2 files are consumed by the BAI2 Parser by 6:30AM\r\n            | extend ExpectedDate =  format_datetime(todatetime(strcat(format_datetime(todatetime(TransmissionDateTime), \"MM/dd/yyyy\"),  \" \",\"06:30:00 AM\")),\"MM/dd/yyyy hh:mm:ss tt\")\r\n            //get the Expected Date for BOA_AVDC files are consumed by the BAI2 Parser by 11:30AM ,\r\n            // Note: need add more logic on this BOA_AVDC files for time because these files receiving multiple times in day.\r\n            | extend BOA_ExpectedDate =  format_datetime(todatetime(strcat(format_datetime(todatetime(TransmissionDateTime), \"MM/dd/yyyy\"),  \" \",\"23:30:00 PM\")),\"MM/dd/yyyy hh:mm:ss tt\")\r\n            //Get Status should be good if file is uploaded less than 6:30 AM EST and Delayed if greater than 6:30 AM\r\n            | extend Status = iff(customDimensions.FileName contains \"BOA_AVDC\", \r\n            (iff(todatetime(CustomDimensionsEventDateTime) > todatetime(BOA_ExpectedDate), \"Delayed\", \"Good\")),\r\n            (iff(todatetime(CustomDimensionsEventDateTime) > todatetime(ExpectedDate), \"Delayed\", \"Good\")))\r\n// Get Total Files Uploaded for all BAI2 files\r\n| summarize TotalFilesUploaded = count(),\r\n//Get Percent should be good if file is uploaded less than 6:30 AM EST\r\n  Percent = countif(Status == \"Good\")/todouble(count()) \r\n| project Percent",
            "resource": "/subscriptions/d5d4da15-d34e-4cf3-a14b-e565ec53a1e5/resourceGroups/ax-ae1-saas-pr-observability-rg/providers/microsoft.operationalinsights/workspaces/ax-ae1-pr-observability-la"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-BAI2-001 - %Bai2Consumed",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Percent"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 5,
        "y": 12
      },
      "id": 8,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "app(\"AX-Ae1-Pr-Payment-Hub-INSIGHTS\").customEvents\r\n| where $__timeFilter(timestamp)\r\n//filter for custom events for UploadToReconStorage. And filter custom dimensions for FileName: BOA_AVDC(Bank of america), AVDC_BAIPD(Fifth Third) and OldNSpd(KeyBank)\r\n| where name == \"Bai2Parser:UploadToReconStorage\" and (toupper(customDimensions.FileName) contains \"BOA_AVDC\")\r\n or (toupper(customDimensions.FileName) contains \"AVDC_BAIPD\") or (customDimensions.FileName contains \"OldNSpd\") \r\n| extend d = parse_json(customDimensions)\r\n            //Converting the UTC datetime to EST datetime\r\n            | extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n            //Converting the UTC datetime to EST datetime for timestamp\r\n            | extend TransmissionDateTime = format_datetime(datetime_utc_to_local(timestamp, \"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n            //get the Expected Date for all BAI2 files are consumed by the BAI2 Parser by 6:30AM\r\n            | extend ExpectedDate =  format_datetime(todatetime(strcat(format_datetime(todatetime(TransmissionDateTime), \"MM/dd/yyyy\"),  \" \",\"06:30:00 AM\")),\"MM/dd/yyyy hh:mm:ss tt\")\r\n            //Get Status should be good if file is uploaded less than 6:30 AM EST and Delayed if greater than 6:30 AM\r\n            | extend Status = iff(todatetime(CustomDimensionsEventDateTime) > todatetime(ExpectedDate), \"Delayed\", \"Good\")\r\n// Get Total Files Uploaded for all BAI2 files\r\n| summarize TotalFilesUploaded = count(),\r\n//Get Percent should be good if file is uploaded less than 6:30 AM EST\r\n  Percent = countif(Status == \"Good\")/todouble(count()) \r\n| project Percent",
            "resource": "/subscriptions/d5d4da15-d34e-4cf3-a14b-e565ec53a1e5/resourceGroups/ax-ae1-saas-pr-observability-rg/providers/microsoft.operationalinsights/workspaces/ax-ae1-pr-observability-la"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-BAI2-002 - %Bai2Sent",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 9,
        "y": 12
      },
      "id": 18,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  | where $__timeFilter(timestamp)\r\n  | where isnotempty(customDimensions)\r\n  //filter for custom events for AchClearing Success and Exception\r\n  | where name has \"Bai2Listener:AchClearing:Success\" or name has \"Bai2Listener:AchClearing:Exception\"\r\n  | extend d = parse_json(customDimensions)\r\n  //Converting the UTC datetime to EST datetime\r\n  | extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n      //Get the count of Ach Clearing Exception\r\n      TotalACHClearingFailureCount = countif(name has \"Bai2Listener:AchClearing:Exception\"),\r\n      //Get the count of Ach Clearing Success    \r\n      TotalACHClearingSuccessCount = countif(name has \"Bai2Listener:AchClearing:Success\"),\r\n      //Get the count of Ach Clearing Success and Check Clearing requests are processed by 10AM\r\n      TotalCountACHClearingSuccessPast10AM = countif(name has \"Bai2Listener:AchClearing:Success\" and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 10)   \r\n  //Case condition will check \r\n  //Check Total Count ACH Clearing by Success for Past 10AM is not zero then get Percent ACH Completed Success fully\r\n  //Check Total ACH Clearing Failure Count is not zero  \r\n  | project PercentACHCompletedSuccessfully = case(TotalCountACHClearingSuccessPast10AM !=0, 1-(TotalCountACHClearingSuccessPast10AM/todouble(TotalACHClearingSuccessCount))\r\n                                                   ,TotalACHClearingFailureCount !=0, 1-(TotalACHClearingFailureCount/todouble(TotalACHClearingSuccessCount)), TotalACHClearingSuccessCount ==0,0.0, \r\n                                                   1.0)",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Hub-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Hub-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "hide": false,
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-BAI2-003 -%ACH Clearing",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 0,
        "y": 15
      },
      "id": 19,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  | where $__timeFilter(timestamp)\r\n  | where isnotempty(customDimensions)\r\n  //filter for custom events for StdCheckClearing Success and Exception\r\n  | where name has \"Bai2Listener:StdCheckClearing:Success\" or name has \"Bai2Listener:StdCheckClearing:Exception\"\r\n  | extend d = parse_json(customDimensions)\r\n  //Converting the UTC datetime to EST datetime\r\n  | extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n      //Get Total Std Check Clearing Failure(Exception) Count\r\n      TotalStdCheckClearingFailureCount = countif(name has \"Bai2Listener:StdCheckClearing:Exception\"),\r\n      //Get Total Std Check Clearing Success Count     \r\n      TotalStdCheckClearingSuccessCount = countif(name has \"Bai2Listener:StdCheckClearing:Success\"),\r\n      //Get Total Std Check Clearing Success and Check Clearing requests are processed by 10AM count\r\n      TotalCountStdCheckClearingSuccessPast10AM = countif(name has \"Bai2Listener:StdCheckClearing:Success\" and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 10)   \r\n  | project \r\n  //Case condition will check \r\n\t//Check for Count of StdCheck Clearing Success Past 10AM not 0 \r\n  //then get Percent Std Check Completed Successfully\r\n  //check TotalStdCheckClearingFailureCount not 0 then Total Std Check Clearing Failure Count\r\n  PercentStdCheckCompletedSuccessfully = case(TotalCountStdCheckClearingSuccessPast10AM !=0,1-(TotalCountStdCheckClearingSuccessPast10AM/todouble(TotalStdCheckClearingSuccessCount)),\r\n                                         TotalStdCheckClearingFailureCount !=0,1-(TotalStdCheckClearingFailureCount/todouble(TotalStdCheckClearingSuccessCount)),TotalStdCheckClearingSuccessCount ==0, 0.0,\r\n                                                       1.0)\r\n  \r\n //iif(TotalStdCheckClearingFailureCount ==0 and TotalCountStdCheckClearingSuccessPast10AM ==0, 1.0,1-(TotalCountStdCheckClearingSuccessPast10AM/todouble(TotalStdCheckClearingSuccessCount)))",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Hub-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Hub-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "hide": false,
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-BAI2-003 - %Check Clearing",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "red",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Percentage"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 6,
        "y": 15
      },
      "id": 35,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n| extend d = parse_json(customDimensions)\r\n| where $__timeFilter(timestamp)\r\n  //filter custom events for Remittance 'Apd Credit','IA Apd Credit' and 'Apd Debit'\r\n| where name == \"Remittance:Apd Credit\" or name == \"Remittance:IA Apd Credit\" or name == \"Remittance:Apd Debit\" \r\n//filter custom events for 'Payment Identified', 'ayment Remittance Sent' and 'Missed'\r\nand ( d.Message contains \"Payment Identified\" or  d.Message contains \"Payment Remittance Sent\" or  d.Message contains \"Missed\")\r\n|summarize \r\n//Get email sent Total for Payment Remittance Sent\r\nTotalEmailSent = countif(d.Message contains \"Payment Remittance Sent\"),\r\n//Get Total for remittance emails are sent successfully delivered to customers by 9AM\r\n CountPast9AMEmailSent = countif( d.Message contains \"Payment Remittance Sent\" and datetime_part(\"hour\", timestamp) > 9)\r\n| project \r\n//Case condition will check for Count of Past9AMEmailSent 09AM not 0 \r\n//then get Percent remittance emails are sent successfully delivered to customers by 9AM\r\nPercentage = case(CountPast9AMEmailSent != 0, 1-(CountPast9AMEmailSent/todouble(TotalEmailSent)),TotalEmailSent == 0, 0.0,1.0)",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Legacy-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Legacy-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "FS-Remittance-001 - %RemittanceEmails",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 25,
      "panels": [],
      "title": "Virtual Card",
      "type": "row"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 0,
        "y": 19
      },
      "id": 28,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents \r\n  | where isnotempty(customDimensions) \r\n  //filter for custom events for VCC cards\r\n  | where name has \"HubCardCreation:CardQueued\" or name has \"HubVcRouting:cardCreated\" \r\n  | extend d = parse_json(customDimensions) \r\n  //Converting the UTC datetime to EST datetime\r\n  | extend CustomDimensionsEventDateTime = format_datetime(datetime_utc_to_local(todatetime(d.EventTime),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\") \r\n  | summarize \r\n\t\t\t//Get total count of VCC cards created\r\n\t\t\tTotalCardCreatedCount = sumif(toint(itemCount),name has \"HubVcRouting:cardCreated\"), \r\n            //Get total count of VCC cards queued\r\n\t\t\tTotalCardQueuedCount =    sumif(toint(customDimensions.ProcessedTotal),name has \"HubCardCreation:CardQueued\"),\r\n\t\t\t//Get total count of cards that got sent past 12 AM EST\r\n\t\t\tTotalCountPast12AMCardCreated = sumif(toint(itemCount),name has \"HubVcRouting:cardCreated\" and datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 24)\r\n   //Case condition checks for \r\n   //Checks for VCC cards got sent out post 12 AM EST\r\n   //Checks for Card queued count is 0, which means no cards are stuck\r\n   //Checks for count of card sent is not 0\r\n   //Checks for VCC Queued < Card Created count   \r\n  | project PercentCompletedAfter12AM= case(TotalCardCreatedCount ==0, 0.0, TotalCardQueuedCount==0,1.0,TotalCardQueuedCount < TotalCardCreatedCount,1.0, TotalCountPast12AMCardCreated !=0, 1-(TotalCountPast12AMCardCreated/todouble(TotalCardCreatedCount)), 1.0)",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Hub-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Hub-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "VCS-Creation-001 - %Card Created",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 7,
        "x": 5,
        "y": 19
      },
      "id": 36,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  | where  $__timeFilter(timestamp) \r\n  //filter for custom events for WEX transactions\r\n  | where isnotempty(customDimensions) and name has \"WexETLService:FileProcessed\"\r\n  | extend d = parse_json(customDimensions)\r\n  //Converting the UTC datetime to EST datetime\r\n  | extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(timestamp),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n\t//Get the count of expected amount\r\n\tTotalExpectedTransaction = sum(toint(customDimensions[\"ExpectedTransactionCount\"])),\r\n\t//Get the count of actual amount processed\r\n\tTotalActualTransaction = sum(toint(customDimensions[\"ActualTransactionCount\"])),\r\n\t//Get the count of actual amount processed after 3 am EST\r\n    TotalTransactionPast3AM = sumif(toint(customDimensions[\"ActualTransactionCount\"]), datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 3 )\r\n    //Case condition checks for \r\n    //Checks for transaction completed after 3 AM\r\n    //Check of acutal and expected amounts are matching\r\n    //Check for count of actual and expected amount is not 0 \r\n   | project PercentWEXTransaction = case(TotalTransactionPast3AM != 0, 1-(TotalTransactionPast3AM/todouble(TotalActualTransaction)),TotalActualTransaction != TotalExpectedTransaction,1-(TotalActualTransaction/todouble(TotalExpectedTransaction)), TotalActualTransaction ==0,0.0,TotalExpectedTransaction ==0,0.0, 1.0)\r\n   ",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Hub-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Hub-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "VCS-WEXCreation-001 - %WEXTransactions",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-azure-monitor-datasource",
        "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "from": 0.5,
                "result": {
                  "color": "green",
                  "index": 0
                },
                "to": 1
              },
              "type": "range"
            },
            {
              "options": {
                "from": 0,
                "result": {
                  "color": "red",
                  "index": 1
                },
                "to": 0.5
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 12,
        "x": 0,
        "y": 22
      },
      "id": 37,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.3.2",
      "targets": [
        {
          "azureLogAnalytics": {
            "query": "customEvents\r\n  //| where  $__timeFilter(timestamp) \r\n  //filter for custom events for Remittance emails\r\n  | where name has \"HubCardDistribution:ProcessingSendMessage\" or name has \"HubCardDistribution:ProcessingSendingMessage\"\r\n  | extend d = parse_json(customDimensions)\r\n   //Converting the UTC datetime to EST datetime\r\n  | extend CustomDimensionsEventDateTime =  format_datetime(datetime_utc_to_local(todatetime(timestamp),\"US/Eastern\"), \"MM/dd/yyyy hh:mm:ss tt\")\r\n  | summarize \r\n\t//Get count of email queued for sending\r\n\tTotalEmailsQueued = sumif(toint(itemCount),name has \"HubCardDistribution:ProcessingSendingMessage\"),\r\n    //Get count of email sent\r\n\tTotalEmailSent = sumif(toint(itemCount),name has \"HubCardDistribution:ProcessingSendMessage\"),\r\n\t//Get count of email sent out after 2 pm EST\r\n    TotalEmailSentPast2PM = sumif(toint(name has \"HubCardDistribution:ProcessingSendMessage\"), datetime_part(\"hour\", todatetime(CustomDimensionsEventDateTime)) > 14 )\r\n\t//case conditions checks for\r\n\t//Checks for email sent out after 2 pm EST\r\n\t//Checks for count of email sent and  email queued are same\r\n\t//Checks for count of email queued > sent is same calculate the difference\r\n   | project PercentEmailSent = case(TotalEmailSentPast2PM != 0,1-(TotalEmailSentPast2PM/todouble(TotalEmailSent)),TotalEmailsQueued > TotalEmailSent,1-(TotalEmailSent/todouble(TotalEmailsQueued)),TotalEmailsQueued==0,0.0,TotalEmailSent==0,0.0, 1.0)",
            "resource": "/subscriptions/656ab744-0db9-48ac-b23a-4b3737472e94/resourceGroups/AX-Ae1-Payment-Hub-RG/providers/Microsoft.Insights/components/AX-Ae1-Pr-Payment-Hub-INSIGHTS"
          },
          "azureMonitor": {
            "allowedTimeGrainsMs": [],
            "timeGrain": "auto"
          },
          "datasource": {
            "type": "grafana-azure-monitor-datasource",
            "uid": "${DS_AZURE_MONITOR - SAAS_INFRA}"
          },
          "queryType": "Azure Log Analytics",
          "refId": "A"
        }
      ],
      "title": "VCS-Delivery-002 - %DeliveryRemittanceEmail",
      "type": "stat"
    }
  ],
  "refresh": false,
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-30d",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "America/New_York",
  "title": "Avid Pay SLO Monitoring",
  "uid": "iOxGpJx4k",
  "version": 311,
  "weekStart": "",
  "gnetId": 18548,
  "description": "Testing import AvidPay SLO Monitoring dashboard"
}