| { |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", |
| "contentVersion": "1.0.0.0", |
| "parameters": { |
| "la-workspace-name": { |
| "type": "string", |
| "metadata": { |
| "description": "Log analytics workspace name" |
| } |
| }, |
| "service-tier": { |
| "type": "string", |
| "defaultValue": "PerNode", |
| "allowedValues": [ |
| "Free", |
| "Standalone", |
| "PerNode", |
| "PerGB2018" |
| ], |
| "metadata": { |
| "description": "Service Tier: Free, Standalone, PerGB or PerNode" |
| } |
| }, |
| "location": { |
| "type": "string", |
| "defaultValue": "[resourceGroup().location]", |
| "metadata": { |
| "description": "Region used when establishing the workspace" |
| } |
| } |
| }, |
| "variables": { |
| "log-analytics-search-version": 1 |
| }, |
| "resources": [ |
| { |
| "apiVersion": "2017-03-15-preview", |
| "type": "Microsoft.OperationalInsights/workspaces", |
| "location": "[parameters('location')]", |
| "name": "[parameters('la-workspace-name')]", |
| "properties": { |
| "features": { |
| "searchVersion": "[variables('log-analytics-search-version')]" |
| }, |
| "sku": { |
| "name": "[parameters('service-tier')]" |
| } |
| }, |
| "resources": [ |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleSyslog1", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxSyslog", |
| "properties": { |
| "syslogName": "kern", |
| "syslogSeverities": [ |
| { |
| "severity": "emerg" |
| }, |
| { |
| "severity": "alert" |
| }, |
| { |
| "severity": "crit" |
| }, |
| { |
| "severity": "err" |
| }, |
| { |
| "severity": "warning" |
| } |
| ] |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleSyslog2", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxSyslog", |
| "properties": { |
| "syslogName": "user", |
| "syslogSeverities": [ |
| { |
| "severity": "notice" |
| } |
| ] |
| |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleSyslogCollection1", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxSyslogCollection", |
| "properties": { |
| "state": "Enabled" |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleLinuxPerf1", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxPerformanceObject", |
| "properties": { |
| "performanceCounters": [ |
| { |
| "counterName": "% Used Inodes" |
| }, |
| { |
| "counterName": "Free Megabytes" |
| }, |
| { |
| "counterName": "% Used Space" |
| }, |
| { |
| "counterName": "Disk Transfers/sec" |
| }, |
| { |
| "counterName": "Disk Reads/sec" |
| }, |
| { |
| "counterName": "Disk Writes/sec" |
| } |
| ], |
| "objectName": "Logical Disk", |
| "instanceName": "*", |
| "intervalSeconds": 60 |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleLinuxPerf2", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxPerformanceObject", |
| "properties": { |
| "performanceCounters": [ |
| { |
| "counterName": "Available MBytes Memory" |
| }, |
| { |
| "counterName": "% Used Memory" |
| }, |
| { |
| "counterName": "% Used Swap Space" |
| } |
| ], |
| "objectName": "Memory", |
| "instanceName": "*", |
| "intervalSeconds": 60 |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleLinuxPerf3", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxPerformanceObject", |
| "properties": { |
| "performanceCounters": [ |
| { |
| "counterName": "Total Bytes Transmitted" |
| }, |
| { |
| "counterName": "Total Bytes Received" |
| }, |
| { |
| "counterName": "Total Rx Errors" |
| }, |
| { |
| "counterName": "Total Tx Errors" |
| } |
| ], |
| "objectName": "Network", |
| "instanceName": "*", |
| "intervalSeconds": 60 |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleLinuxPerf4", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxPerformanceObject", |
| "properties": { |
| "performanceCounters": [ |
| { |
| "counterName": "% Processor Time" |
| }, |
| { |
| "counterName": "% Privileged Time" |
| }, |
| { |
| "counterName": "% IO Wait Time" |
| }, |
| { |
| "counterName": "% Idle Time" |
| }, |
| { |
| "counterName": "% User Time" |
| } |
| ], |
| "objectName": "Processor", |
| "instanceName": "*", |
| "intervalSeconds": 60 |
| } |
| }, |
| { |
| "apiVersion": "2015-11-01-preview", |
| "type": "datasources", |
| "name": "sampleLinuxPerfCollection1", |
| "dependsOn": [ |
| "[concat('Microsoft.OperationalInsights/workspaces/', parameters('la-workspace-name'))]" |
| ], |
| "kind": "LinuxPerformanceCollection", |
| "properties": { |
| "state": "Enabled" |
| } |
| } |
| ] |
| } |
| ], |
| "outputs": { |
| "la-resourceId": { |
| "type": "string", |
| "value": "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('la-workspace-name'))]" |
| }, |
| "la-workspace-resourceGroup": { |
| "type": "string", |
| "value": "[resourceGroup().name]" |
| }, |
| "la-workspace-name": { |
| "type": "string", |
| "value": "[parameters('la-workspace-name')]" |
| }, |
| "la-workspace-id": { |
| "type": "string", |
| "value": "[reference(resourceId('Microsoft.OperationalInsights/workspaces', parameters('la-workspace-name')), '2015-03-20').customerId]" |
| }, |
| "la-primary-shared-key": { |
| "type": "string", |
| "value": "[listKeys(resourceId('Microsoft.OperationalInsights/workspaces', parameters('la-workspace-name')), '2015-03-20').primarySharedKey]" |
| } |
| } |
| } |