Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

2.3 KB
Raw Blame
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "dataCollectionRuleName": {
      "type": "string",
      "defaultValue": "dcr-beacon-runtime-ingestion"
    },
    "workspaceResourceId": {
      "type": "string",
      "metadata": {
        "description": "Resource ID of the Log Analytics workspace enabled for Microsoft Sentinel."
      }
    },
    "dataCollectionEndpointResourceId": {
      "type": "string",
      "defaultValue": "",
      "metadata": {
        "description": "Optional. Resource ID of a Data Collection Endpoint in the workspace's region, for Private Link. Without one the DCR gets its own logs ingestion URL (properties.endpoints.logsIngestion)."
      }
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]"
    }
  },
  "resources": [
    {
      "type": "Microsoft.Insights/dataCollectionRules",
      "apiVersion": "2023-03-11",
      "name": "[parameters('dataCollectionRuleName')]",
      "location": "[parameters('location')]",
      "kind": "Direct",
      "properties": {
        "dataCollectionEndpointId": "[if(empty(parameters('dataCollectionEndpointResourceId')), null(), parameters('dataCollectionEndpointResourceId'))]",
        "streamDeclarations": {
          "Custom-BeaconRuntimeRaw": {
            "columns": [
              { "name": "TimeGenerated", "type": "datetime" },
              { "name": "RawData", "type": "string" }
            ]
          }
        },
        "destinations": {
          "logAnalytics": [
            {
              "workspaceResourceId": "[parameters('workspaceResourceId')]",
              "name": "sentinelWorkspace"
            }
          ]
        },
        "dataFlows": [
          {
            "streams": [
              "Custom-BeaconRuntimeRaw"
            ],
            "destinations": [
              "sentinelWorkspace"
            ],
            "transformKql": "{{DCR_TRANSFORM}}",
            "outputStream": "Custom-BeaconRuntime_CL"
          }
        ]
      }
    }
  ],
  "outputs": {
    "dcrImmutableId": {
      "type": "string",
      "value": "[reference(resourceId('Microsoft.Insights/dataCollectionRules', parameters('dataCollectionRuleName'))).immutableId]"
    }
  }
}