Share via


Azure Monitor의 통합 문서에 대한 Resource Manager 템플릿 샘플

이 문서에는 Azure Monitor의 통합 문서를 만들기 위한 Azure Resource Manager 템플릿 샘플이 포함되어 있습니다. 각 샘플에는 템플릿 파일과 템플릿에 제공할 샘플 값이 포함된 매개 변수 파일이 포함되어 있습니다.

참고 항목

사용 가능한 샘플 목록과 Azure 구독에 배포하는 방법에 대한 지침은 Azure Monitor에 대한 Azure Resource Manager 샘플을 참조하세요.

통합 문서는 복잡할 수 있으므로 일반적인 전략은 Azure Portal에서 통합 문서를 만든 다음, Resource Manager 템플릿을 생성하는 것입니다. 통합 문서 배포를 위한 Azure Resource Manager 템플릿에서 이 방법에 대한 세부 정보를 참조하세요.

통합 문서 만들기

다음 샘플에서는 간단한 통합 문서를 만듭니다.

템플릿 파일

@description('The unique guid for this workbook instance.')
param workbookId string = newGuid()

@description('The location of the resource.')
param location string = resourceGroup().location

@description('The friendly name for the workbook that is used in the Gallery or Saved List. Needs to be unique in the scope of the resource group and source.')
param workbookDisplayName string = 'My Workbook'

@description('The gallery that the workbook will been shown under. Supported values include workbook, `tsg`, Azure Monitor, etc.')
param workbookType string = 'tsg'

@description('The id of resource instance to which the workbook will be associated.')
param workbookSourceId string = '<insert-your-resource-id-here>'


resource workbook 'Microsoft.Insights/workbooks@2018-06-17-preview' = {
  name: workbookId
  location: location
  kind: 'shared'
  properties: {
    displayName: workbookDisplayName
    serializedData: '{"version":"Notebook/1.0","items":[{"type":1,"content":"{\\"json\\":\\"Hello World!\\"}","conditionalVisibility":null}],"isLocked":false}'
    version: '1.0'
    sourceId: workbookSourceId
    category: workbookType
  }
}

output workbookId string = workbook.id

매개 변수 파일

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workbookDisplayName": {
      "value": "Sample Hello World workbook"
    },
    "workbookType": {
      "value": "workbook"
    },
    "workbookSourceId": {
      "value": "Azure Monitor"
    }
  }
}

다음 단계