New-CmAzCoreMonitor

Deploys monitoring for core resources.

Completes the following:

  • Deploys log analytics, app insights and storage accountp.
  • Deploys management solutions for keyvaults, subscription activity, agent health, updates and VM insights.
    • Deploys action groups and alerts for service health, keyvault admin and resource health for applicable core resources.

This command forms part of the Core Building Block.

Parameters

-SettingsFile

Required. (String) File path for the settings file to be converted into a settings object.

-SettingsObject

Required. (Object) Object containing the configuration values required to run this cmdlet.

-TagSettingsFile

Required. (String) File path for settings containing tags definition.

-WhatIf

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

-Confirm

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

Usage

Example 1

1
New-CmAzCoreMonitor -SettingsFile "c:/directory/settingsFile.yml"

Example 2

1
New-CmAzCoreMonitor -SettingsObject $settings

Settings

Beta documentation
The following schema documentation is automatically generated as part of a recent roadmap task. There may be inaccuracies or incomplete information while we flush out bugs; please refer to the packed project settings examples where necessary.

Settings Root.

Component

component [string | null]

Value to determine what cmdlet should be dynamically loaded for these settings.

Name

name [string] Mandatory

Becomes part of the generated names for all deployed resources.

Location

location [string] Mandatory

Location for all resource deployments.

AdvisorLowCPUThresholdPercentage

advisorLowCPUThresholdPercentage [integer] Mandatory

Set the cpu threshold for Azure Advisor.

WorkspaceDataRetentionInDays

workspaceDataRetentionInDays [integer | null]

Log Analytics data retention in days.

Default:90

StorageDataRetentionInDays

storageDataRetentionInDays [integer | null]

Storage diagnostic setting data retention in days.

Default:0

Service

service [object] Mandatory

Contains dependency and publish details for service location.

Publish

publish [object]

Contains publish details for service location.

ActionGroup

actionGroup [string | null]

Global default value to publish on deployed resource type.

Workbook

workbook [string | null]

Global default value to publish on deployed resource type.

KeyvaultAdminAlert

keyvaultAdminAlert [string]

Value to publish on deployed resource type.

ResourceHealthAlert

resourceHealthAlert [string]

Value to publish on deployed resource type.

ServiceHealthAlert

serviceHealthAlert [string]

Value to publish on deployed resource type.

AppInsights

appInsights [string | null]

Value to publish on deployed resource type.

ResourceGroup

resourceGroup [string]

Value to publish on deployed resource type.

Solution

solution [string]

Value to publish on deployed resource type.

Storage

storage [string | null]

Value to publish on deployed resource type.

Workspace

workspace [string | null]

Value to publish on deployed resource type.

Dependencies

dependencies [object]

Contains dependency details for service location.

Keyvault

keyvault [string]

Dependency value to fetch existing resource type.

Storage

appInsights [string | null]

Dependency value to fetch existing resource type.

AppInsights

storage [string | null]

Dependency value to fetch existing resource type.

Workspace

workspace [string | null]

Dependency value to fetch existing resource type.

Alerts

alerts [object] Mandatory

Details required to deploy all alerts.

KeyvaultAdmin

keyvaultAdmin [object]

Contains details required to deploy a activity log alert for administration operations on a key vault.

ActionGroupName

actionGroupName [string]

Part of the name of the action group to link the alert to, needs to match the name of an action group below.

Enabled

enabled [boolean | null]

If the alert is enabled ot not.

ResourceHealth

resourceHealth [object]

Contains details required to deploy a resource health alert for all applicable core resources.

ActionGroupName

actionGroupName [string]

Part of the name of the action group to link the alert to, needs to match the name of an action group below.

Enabled

enabled [boolean | null]

If the alert is enabled ot not.

ServiceHealth

serviceHealth [object]

Contains details required to deploy a service health alert for all services and all chosen locations...

ActionGroupName

actionGroupName [string]

Part of the name of the action group to link the alert to, needs to match the name of an action group below.

ImpactedLocations

impactedLocations [array | null]

Locations the service health alerts are applicable for.

Enabled

enabled [boolean | null]

If the alert is enabled ot not.

ActionGroups

actionGroups [array]

All details required to deploy multiple action groups.

Name

name [string] Mandatory

Becomes part of the generated action group's name.

Shortname

shortname [string]

Friendly name for the action groups, used in emails/sms etc.

Service

service [object | null] Mandatory

Contains dependency and publish details for service location.

Publish

publish [object | null]

Contains publish details for service location.

ActionGroup

actionGroup [string | null]

Local overriding value to publish on deployed existing resource type.

ArmRoles

armRoles [array | null]

All details required to deploy multiple arm role receivers.

RoleId

roleId [string]

Arm role receiver id.

Emails

emails [array | null]

All details required to deploy multiple email receivers.

EmailAddress

emailAddress [string]

The email address of this receiver.

Functions

functions [array | null]

All details required to deploy multiple azure function receivers.

FunctionAppResourceId

functionAppResourceId [string]

Resource id of the azure function app.

FunctionName

functionName [string]

Name of the azure function app.

HttpTriggerUrl

httpTriggerUrl [string]

Url of the http trigger azure function.

ITSM

itsm [array | null]

All details required to deploy multiple itsm receivers.

WorkspaceId

workspaceId [string]

Log analytics workspace id.

ConnectionId

connectionId [string]

Unique id of the ITSM's connection defined in log analytics workpace.

TicketConfiguration

ticketConfiguration [string]

JSON blob for configuring the action of the ITSM.

Location

location [string] Mandatory

Log analytics workspace location.

LogicApps

logicApps [array | null]

All details required to deploy multiple logic apps receivers.

ResourceId

resourceId [string]

Resource id of the existing logic app.

CallbackUrl

callbackUrl [string]

The http trigger url of the existing logic app where the request is sent.

Notifications

notifications [array | null]

All details required to deploy multiple notification receivers.

EmailAddress

emailAddress [string]

Address for the azure mobile app.

Runbooks

runbooks [array | null]

All details required to deploy multiple runbook receivers.

AutomationAccountId

automationAccountId [string]

AThe resource id of the existing automation account.

RunbookName

runbookName [string]

Name of the runbook in the above automation account.

WebhookResourceId

webhookResourceId [string]

Resource id of the webhook defined in the existing runbook.

IsGlobalRunbook

isGlobalRunbook [boolean]

If the runbook instance is global.

ServiceUri

serviceUri [string | null]

The uri where the webhooks are sent.

SMS

sms [array | null]

All details required to deploy multiple sms receivers.

CountryCode

countryCode [string]

Receiver's country code.

PhoneNumber

phoneNumber [string]

Receiver's phone number.

Voice

voice [array | null]

All details required to deploy multiple voice receivers.

CountryCode

countryCode [string]

Receiver's country code.

PhoneNumber

phoneNumber [string]

Receiver's phone number.

Webhook

webhooks [array | null]

All details required to deploy multiple webhook receivers.

ServiceUri

serviceUri [string]

Where webhooks are dispatched to.

UseAadAuth

useAadAuth [boolean | null]

Utilise aad authentication.

ObjectId

objectId [string | null]

Existing webhook app id.

IdentifierUri

identifierUri [string | null]

Uri for aad authentication.

TenantId

tenantId [string | null]

Tenant id for aad authentication.

Examples

The following example files are automatically generated from the settings file schema definition to show how the specification can be used in practise. Cloudmarque can accept both JSON and YAML parameter files.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
  "component": "string",
  "name": "string",
  "location": "string",
  "advisorLowCPUThresholdPercentage": 0,
  "workspaceDataRetentionInDays": "90",
  "storageDataRetentionInDays": "0",
  "service": {
    "publish": {
      "actionGroup": "string",
      "workbook": "string",
      "keyvaultAdminAlert": "string",
      "resourceHealthAlert": "string",
      "serviceHealthAlert": "string",
      "appInsights": "string",
      "resourceGroup": "string",
      "solution": "string",
      "storage": "string",
      "workspace": "string"
    },
    "dependencies": {
      "keyvault": "string",
      "appInsights": "string",
      "storage": "string",
      "workspace": "string"
    }
  },
  "alerts": {
    "keyvaultAdmin": {
      "actionGroupName": "string",
      "enabled": "boolean"
    },
    "resourceHealth": {
      "actionGroupName": "string",
      "enabled": "boolean"
    },
    "serviceHealth": {
      "actionGroupName": "string",
      "impactedLocations": [
        "string"
      ],
      "enabled": "boolean"
    }
  },
  "actionGroups": [
    {
      "name": "string",
      "shortname": "string",
      "service": {
        "publish": {
          "actionGroup": "string"
        }
      },
      "armRoles": [
        {
          "roleId": "string"
        }
      ],
      "emails": [
        {
          "emailAddress": "string"
        }
      ],
      "functions": [
        {
          "functionAppResourceId": "string",
          "functionName": "string",
          "httpTriggerUrl": "string"
        }
      ],
      "itsm": [
        {
          "workspaceId": "string",
          "connectionId": "string",
          "ticketConfiguration": "string",
          "location": "string"
        }
      ],
      "logicApps": [
        {
          "resourceId": "string",
          "callbackUrl": "string"
        }
      ],
      "notifications": [
        {
          "emailAddress": "string"
        }
      ],
      "runbooks": [
        {
          "automationAccountId": "string",
          "runbookName": "string",
          "webhookResourceId": "string",
          "isGlobalRunbook": true,
          "serviceUri": "string"
        }
      ],
      "sms": [
        {
          "countryCode": "string",
          "phoneNumber": "string"
        }
      ],
      "voice": [
        {
          "countryCode": "string",
          "phoneNumber": "string"
        }
      ],
      "webhooks": [
        {
          "serviceUri": "string",
          "useAadAuth": "boolean",
          "objectId": "string",
          "identifierUri": "string",
          "tenantId": "string"
        }
      ]
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
component: "string"    # Optional
name: "string"    # Mandatory
location: "string"    # Mandatory
advisorLowCPUThresholdPercentage: 0    # Mandatory
workspaceDataRetentionInDays: "90"    # Optional
storageDataRetentionInDays: "0"    # Optional
service:     # Mandatory
  publish:     # Mandatory
    actionGroup: "string"    # Optional
    workbook: "string"    # Mandatory
    keyvaultAdminAlert: "string"    # Mandatory
    resourceHealthAlert: "string"    # Mandatory
    serviceHealthAlert: "string"    # Mandatory
    appInsights: "string"    # Optional
    resourceGroup: "string"    # Mandatory
    solution: "string"    # Mandatory
    storage: "string"    # Optional
    workspace: "string"    # Optional
  dependencies:     # Mandatory
    keyvault: "string"    # Mandatory
    appInsights: "string"    # Optional
    storage: "string"    # Optional
    workspace: "string"    # Optional
alerts:     # Mandatory
  keyvaultAdmin:     # Mandatory
    actionGroupName: "string"    # Mandatory
    enabled: "boolean"    # Optional
  resourceHealth:     # Mandatory
    actionGroupName: "string"    # Mandatory
    enabled: "boolean"    # Optional
  serviceHealth:     # Mandatory
    actionGroupName: "string"    # Mandatory
    impactedLocations:     # Optional
      - "string"
    enabled: "boolean"    # Optional
actionGroups:     # Optional
  - name: "string"    # Mandatory
    shortname: "string"    # Mandatory
    service:     # Optional
      publish:     # Optional
        actionGroup: "string"    # Optional
    armRoles:     # Optional
      - roleId: "string"    # Mandatory
    emails:     # Optional
      - emailAddress: "string"    # Mandatory
    functions:     # Optional
      - functionAppResourceId: "string"    # Mandatory
        functionName: "string"    # Mandatory
        httpTriggerUrl: "string"    # Mandatory
    itsm:     # Optional
      - workspaceId: "string"    # Mandatory
        connectionId: "string"    # Mandatory
        ticketConfiguration: "string"    # Mandatory
        location: "string"    # Mandatory
    logicApps:     # Optional
      - resourceId: "string"    # Mandatory
        callbackUrl: "string"    # Mandatory
    notifications:     # Optional
      - emailAddress: "string"    # Mandatory
    runbooks:     # Optional
      - automationAccountId: "string"    # Mandatory
        runbookName: "string"    # Mandatory
        webhookResourceId: "string"    # Mandatory
        isGlobalRunbook: true    # Mandatory
        serviceUri: "string"    # Optional
    sms:     # Optional
      - countryCode: "string"    # Mandatory
        phoneNumber: "string"    # Mandatory
    voice:     # Optional
      - countryCode: "string"    # Mandatory
        phoneNumber: "string"    # Mandatory
    webhooks:     # Optional
      - serviceUri: "string"    # Mandatory
        useAadAuth: "boolean"    # Optional
        objectId: "string"    # Optional
        identifierUri: "string"    # Optional
        tenantId: "string"    # Optional