Skip to content

Commit 0d65612

Browse files
authored
Merge pull request #14561 from fuqing04/add-github-audit-log-fields-azstorage
Add GitHub audit log fields azstorage
2 parents 1a5ba15 + f36c31a commit 0d65612

10 files changed

Lines changed: 2757 additions & 232 deletions

File tree

Solutions/GitHub/Data Connectors/GitHubAuditLogs_AzStorage/ConnectorDefinition.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
{
1515
"metricName": "Total events received",
1616
"legend": "GitHubAuditLogEvents",
17-
"baseQuery": "GitHubAuditLogsV2_CL"
17+
"baseQuery": "GitHubAuditLogsV3_CL"
1818
}
1919
],
2020
"sampleQueries": [
2121
{
2222
"description": "GitHub Audit Logs",
23-
"query": "GitHubAuditLogsV2_CL | take 10"
23+
"query": "GitHubAuditLogsV3_CL | take 10"
2424
}
2525
],
2626
"dataTypes": [
2727
{
28-
"name": "GitHubAuditLogsV2_CL",
29-
"lastDataReceivedQuery": "GitHubAuditLogsV2_CL | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
28+
"name": "GitHubAuditLogsV3_CL",
29+
"lastDataReceivedQuery": "GitHubAuditLogsV3_CL | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
3030
}
3131
],
3232
"connectivityCriteria": [
@@ -123,7 +123,7 @@
123123
"type": "Textbox",
124124
"parameters": {
125125
"label": "The blob container's storage account resource group name",
126-
"placeholder": "my-resource-group",
126+
"placeholder": "",
127127
"type": "text",
128128
"name": "StorageAccountResourceGroupName"
129129
}
@@ -159,18 +159,15 @@
159159
},
160160
{
161161
"title": "Blob Lifecycle Policy (Recommended)",
162-
"description": "To prevent unbounded storage growth, configure a [lifecycle management policy](https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview) on your storage account to automatically delete blobs after a retention period (for example, 7 days). Once the connector ingests the audit logs into Microsoft Sentinel, the source blobs are no longer needed.\n\nTo create a lifecycle rule scoped to your container:\n1. Navigate to your **Storage Account** -> **Data management** -> **Lifecycle management**.\n2. Click **Add a rule** and configure:\n - **Rule name:** for example, `github-audit-cleanup`\n - **Rule scope:** Select **Limit blobs with filters** and set the **Prefix match** to your container name (for example, `my-container/`). This ensures the rule applies only to blobs in that container.\n - **Blob type:** Block blobs.\n - **Base blobs:** Delete blobs that were last modified more than **7 days** ago (adjust as needed).\n3. Save the rule.\n\n> **Note:** Each storage account has a single management policy that can contain multiple rules. Each rule can target a specific container via prefix filters. If you already have a lifecycle policy, add a new rule to the existing policy rather than creating a new one.",
163-
"instructions": []
162+
"description": "To prevent unbounded storage growth, configure a [lifecycle management policy](https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview) on your storage account to automatically delete blobs after a retention period (for example, 7 days). Once the connector ingests the audit logs into Microsoft Sentinel, the source blobs are no longer needed.\n\nTo create a lifecycle rule scoped to your container:\n1. Navigate to your **Storage Account** -> **Data management** -> **Lifecycle management**.\n2. Click **Add a rule** and configure:\n - **Rule name:** for example, `github-audit-cleanup`\n - **Rule scope:** Select **Limit blobs with filters** and set the **Prefix match** to your container name (for example, `my-container/`). This ensures the rule applies only to blobs in that container.\n - **Blob type:** Block blobs.\n - **Base blobs:** Delete blobs that were last modified more than **7 days** ago (adjust as needed).\n3. Save the rule.\n\n> **Note:** Each storage account has a single management policy that can contain multiple rules. Each rule can target a specific container via prefix filters. If you already have a lifecycle policy, add a new rule to the existing policy rather than creating a new one."
164163
},
165164
{
166165
"title": "Reference",
167-
"description": "For detailed instructions on setting up the Azure Storage connector to stream logs to Microsoft Sentinel, see [Set up Azure Storage connector](https://learn.microsoft.com/en-us/azure/sentinel/setup-azure-storage-connector).",
168-
"instructions": []
166+
"description": "For detailed instructions on setting up the Azure Storage connector to stream logs to Microsoft Sentinel, see [Set up Azure Storage connector](https://learn.microsoft.com/en-us/azure/sentinel/setup-azure-storage-connector)."
169167
},
170168
{
171169
"title": "Troubleshooting",
172-
"description": "If you encounter issues with data ingestion:\n- **Enable the health feature** - If the connector health feature isn't enabled, enable it to monitor connector status and detect issues early.\n- **Enable diagnostic logs** - Consider enabling diagnostic logs for both the **Storage Account** and **Event Grid** resources to help identify and troubleshoot health issues.\n- For more details, see [Troubleshoot Azure Storage Blob connector issues](https://review.learn.microsoft.com/en-us/azure/sentinel/azure-storage-blob-connector-troubleshoot?branch=main).",
173-
"instructions": []
170+
"description": "If you encounter issues with data ingestion:\n- **Enable the health feature** - If the connector health feature isn't enabled, enable it to monitor connector status and detect issues early.\n- **Enable diagnostic logs** - Consider enabling diagnostic logs for both the **Storage Account** and **Event Grid** resources to help identify and troubleshoot health issues.\n- For more details, see [Troubleshoot Azure Storage Blob connector issues](https://review.learn.microsoft.com/en-us/azure/sentinel/azure-storage-blob-connector-troubleshoot?branch=main)."
174171
}
175172
]
176173
}

Solutions/GitHub/Data Connectors/GitHubAuditLogs_AzStorage/DCR.json

Lines changed: 42 additions & 2 deletions
Large diffs are not rendered by default.

Solutions/GitHub/Data Connectors/GitHubAuditLogs_AzStorage/PollingConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"isGzipCompressed": true
3030
},
3131
"connectorDefinitionName": "GitHubAuditBlobConnector",
32-
"dataType": "GitHubAuditLogsV2_CL",
32+
"dataType": "GitHubAuditLogsV3_CL",
3333
"dcrConfig": {
3434
"streamName": "Custom-GitHubAuditLogs",
3535
"dataCollectionEndpoint": "{{dataCollectionEndpoint}}",

Solutions/GitHub/Data Connectors/GitHubAuditLogs_AzStorage/table_GitHubAuditLogsV2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,4 +1172,4 @@
11721172
]
11731173
}
11741174
}
1175-
}
1175+
}

0 commit comments

Comments
 (0)