在没有 Azure 安全中心的情况下从 Azure 中提取警报日志

Extract Alerts logs from Azure without Azure security Centre

我想提取 CSV 格式的警报日志,以表明我收到了此类警报。 但是无法从 azure 日志查询 中提取或者我必须安装一些 agent?

您可以列出所有现有的警报,其中可以根据多个参数(例如时间范围)过滤结果。然后可以根据特定字段对结果进行排序,默认值为 lastModifiedDateTime:

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05

与可选参数类似:

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts?targetResource={targetResource}&targetResourceType={targetResourceType}&targetResourceGroup={targetResourceGroup}&monitorService={monitorService}&monitorCondition={monitorCondition}&severity={severity}&alertState={alertState}&alertRule={alertRule}&smartGroupId={smartGroupId}&includeContext={includeContext}&includeEgressConfig={includeEgressConfig}&pageCount={pageCount}&sortBy={sortBy}&sortOrder={sortOrder}&select={select}&timeRange={timeRange}&customTimeRange={customTimeRange}&api-version=2018-05-05

要检查日志的其他 URI 参数,您可以参考此 URL

最后,当您获得 JSON 格式的回复时,您可能会使用任何 freely 可用的在线转换将其自动转换为 CSV 格式公用事业(比如这项服务 HERE