Skip to content

Commit 5736b7d

Browse files
committed
fixing validation error
1 parent 5e94f9c commit 5736b7d

File tree

1 file changed

+33
-35
lines changed

1 file changed

+33
-35
lines changed

articles/azure-monitor/vm/monitor-virtual-machine-data-collection.md

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,19 @@ Use the following guidance as a recommended starting point for event collection.
9898

9999
| Query | Description |
100100
|:---|:---|
101-
| Event | All Windows events |
102-
| Event | where EventLevelName == "Error"` |All Windows events with severity of error |
103-
| Event | summarize count() by Source` |Count of Windows events by source |
104-
| Event | where EventLevelName == "Error" | summarize count() by Source` |Count of Windows error events by source |
101+
| `Event` | All Windows events |
102+
| `Event | where EventLevelName == "Error"` |All Windows events with severity of error |
103+
| `Event | summarize count() by Source` |Count of Windows events by source |
104+
| `Event | where EventLevelName == "Error" | summarize count() by Source` |Count of Windows error events by source |
105105

106106
### Sample log queries: Syslog events
107107

108108
| Query | Description |
109109
|:---|:---|
110-
| Syslog |All Syslogs |
111-
| Syslog | where SeverityLevel == "error"` |All Syslog records with severity of error |
112-
| Syslog | summarize AggregatedValue = count() by Computer` |Count of Syslog records by computer |
113-
| Syslog | summarize AggregatedValue = count() by Facility` |Count of Syslog records by facility |
110+
| `Syslog` |All Syslogs |
111+
| `Syslog | where SeverityLevel == "error"` |All Syslog records with severity of error |
112+
| `Syslog | summarize AggregatedValue = count() by Computer` |Count of Syslog records by computer |
113+
| `Syslog | summarize AggregatedValue = count() by Facility` |Count of Syslog records by facility |
114114

115115
## Collect performance counters
116116
Performance data from the client can be sent to either [Azure Monitor Metrics](../essentials/data-platform-metrics.md) or [Azure Monitor Logs](../logs/data-platform-logs.md), and you typically send them to both destinations. If you enabled VM insights, a common set of performance counters is collected in Logs to support its performance charts. You can't modify this set of counters, but you can create other DCRs to collect more counters and send them to different destinations.
@@ -130,24 +130,24 @@ For guidance on creating a DCR to collect performance counters, see [Collect eve
130130
Destination | Description |
131131
|:---|:---|
132132
| Metrics | Host metrics are automatically sent to Azure Monitor Metrics. You can use a DCR to collect client metrics so that they can be analyzed together with [metrics explorer](../essentials/metrics-getting-started.md) or used with [metrics alerts](../alerts/alerts-create-new-alert-rule.md?tabs=metric). This data is stored for 93 days. |
133-
| Logs | Performance data stored in Azure Monitor Logs can be stored for extended periods. The data can be analyzed along with your event data by using [log queries](../logs/log-query-overview.md) with [Log Analytics](../logs/log-analytics-overview.md) or [log query alerts](../alerts/alerts-create-new-alert-rule.md?tabs=log). You can also correlate data by using complex logic across multiple machines, regions, and subscriptions.<br><br>Performance data is sent to the following tables:<br>VM insights - [InsightsMetrics](/azure/azure-monitor/reference/tables/insightsmetrics)<br>Other performance data - [Perf](/azure/azure-monitor/reference/tables/perf) |
133+
| Logs | Performance data stored in Azure Monitor Logs can be stored for extended periods. The data can be analyzed along with your event data by using [log queries](../logs/log-query-overview.md) with [Log Analytics](../logs/log-analytics-overview.md) or [log query alerts](../alerts/alerts-create-new-alert-rule.md?tabs=log). You can also correlate data by using complex logic across multiple machines, regions, and subscriptions.<br><br>Performance data is sent to the following tables:<br>- VM insights: [InsightsMetrics](/azure/azure-monitor/reference/tables/insightsmetrics)<br>- Other performance data: [Perf](/azure/azure-monitor/reference/tables/perf) |
134134

135135
### Sample log queries
136136
The following samples use the `Perf` table with custom performance data. For information on performance data collected by VM insights, see [How to query logs from VM insights](../vm/vminsights-log-query.md#performance-records).
137137

138138
| Query | Description |
139139
|:---|:---|
140-
| Perf | All Performance data |
141-
| Perf | where Computer == "MyComputer"` |All Performance data from a particular computer |
142-
| Perf | where CounterName == "Current Disk Queue Length"` |All Performance data for a particular counter |
143-
| Perf | where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AVGCPU = avg(CounterValue) by Computer` |Average CPU Utilization across all computers |
144-
| Perf | where CounterName == "% Processor Time" | summarize AggregatedValue = max(CounterValue) by Computer` |Maximum CPU Utilization across all computers |
145-
| Perf | where ObjectName == "LogicalDisk" and CounterName == "Current Disk Queue Length" and Computer == "MyComputerName" | summarize AggregatedValue = avg(CounterValue) by InstanceName` |Average Current Disk Queue length across all the instances of a given computer |
146-
| Perf | where CounterName == "Disk Transfers/sec" | summarize AggregatedValue = percentile(CounterValue, 95) by Computer` |95th Percentile of Disk Transfers/Sec across all computers |
147-
| Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer` |Hourly average of CPU usage across all computers |
148-
| Perf | where Computer == "MyComputer" and CounterName startswith_cs "%" and InstanceName == "_Total" | summarize AggregatedValue = percentile(CounterValue, 70) by bin(TimeGenerated, 1h), CounterName` | Hourly 70 percentile of every % percent counter for a particular computer |
149-
| Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer" | summarize ["min(CounterValue)"] = min(CounterValue), ["avg(CounterValue)"] = avg(CounterValue), ["percentile75(CounterValue)"] = percentile(CounterValue, 75), ["max(CounterValue)"] = max(CounterValue) by bin(TimeGenerated, 1h), Computer` |Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer |
150-
| Perf | where ObjectName == "MSSQL$INST2:Databases" and InstanceName == "master"` | All Performance data from the Database performance object for the master database from the named SQL Server instance INST2. |
140+
| `Perf` | All Performance data |
141+
| `Perf | where Computer == "MyComputer"` |All Performance data from a particular computer |
142+
| `Perf | where CounterName == "Current Disk Queue Length"` |All Performance data for a particular counter |
143+
| `Perf | where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AVGCPU = avg(CounterValue) by Computer` |Average CPU Utilization across all computers |
144+
| `Perf | where CounterName == "% Processor Time" | summarize AggregatedValue = max(CounterValue) by Computer` |Maximum CPU Utilization across all computers |
145+
| `Perf | where ObjectName == "LogicalDisk" and CounterName == "Current Disk Queue Length" and Computer == "MyComputerName" | summarize AggregatedValue = avg(CounterValue) by InstanceName` |Average Current Disk Queue length across all the instances of a given computer |
146+
| `Perf | where CounterName == "Disk Transfers/sec" | summarize AggregatedValue = percentile(CounterValue, 95) by Computer` |95th Percentile of Disk Transfers/Sec across all computers |
147+
| `Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" | summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer` |Hourly average of CPU usage across all computers |
148+
| `Perf | where Computer == "MyComputer" and CounterName startswith_cs "%" and InstanceName == "_Total" | summarize AggregatedValue = percentile(CounterValue, 70) by bin(TimeGenerated, 1h), CounterName` | Hourly 70 percentile of every % percent counter for a particular computer |
149+
| `Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer" | summarize ["min(CounterValue)"] = min(CounterValue), ["avg(CounterValue)"] = avg(CounterValue), ["percentile75(CounterValue)"] = percentile(CounterValue, 75), ["max(CounterValue)"] = max(CounterValue) by bin(TimeGenerated, 1h), Computer` |Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer |
150+
| `Perf | where ObjectName == "MSSQL$INST2:Databases" and InstanceName == "master"` | All Performance data from the Database performance object for the master database from the named SQL Server instance INST2. |
151151

152152
## Collect text logs
153153
Some applications write events written to a text log stored on the virtual machine. Create a [custom table and DCR](../agents/data-collection-text-log.md) to collect this data. You define the location of the text log, its detailed configuration, and the schema of the custom table. There's a cost for the ingestion and retention of this data in the workspace.
@@ -157,8 +157,8 @@ The column names used here are examples only. The column names for your log will
157157

158158
| Query | Description |
159159
|:---|:---|
160-
| MyApp_CL | summarize count() by code` | Count the number of events by code. |
161-
| MyApp_CL | where status == "Error" | summarize AggregatedValue = count() by Computer, bin(TimeGenerated, 15m)` | Create an alert rule on any error event. |
160+
| `MyApp_CL | summarize count() by code` | Count the number of events by code. |
161+
| `MyApp_CL | where status == "Error" | summarize AggregatedValue = count() by Computer, bin(TimeGenerated, 15m)` | Create an alert rule on any error event. |
162162

163163
## Collect IIS logs
164164
IIS running on Windows machines writes logs to a text file. Configure IIS log collection by using [Collect IIS logs with Azure Monitor Agent](../agents/data-collection-iis.md). There's a cost for the ingestion and retention of this data in the workspace.
@@ -169,8 +169,8 @@ Records from the IIS log are stored in the [W3CIISLog](/azure/azure-monitor/refe
169169

170170
| Query | Description |
171171
|:---|:---|
172-
| W3CIISLog | where csHost=="www.contoso.com" | summarize count() by csUriStem` | Count the IIS log entries by URL for the host www.contoso.com. |
173-
| W3CIISLog | summarize sum(csBytes) by Computer` | Review the total bytes received by each IIS machine. |
172+
| `W3CIISLog | where csHost=="www.contoso.com" | summarize count() by csUriStem` | Count the IIS log entries by URL for the host www.contoso.com. |
173+
| `W3CIISLog | summarize sum(csBytes) by Computer` | Review the total bytes received by each IIS machine. |
174174

175175
## Monitor a service or daemon
176176
To monitor the status of a Windows service or Linux daemon, enable the [Change Tracking and Inventory](../../automation/change-tracking/overview.md) solution in [Azure Automation](../../automation/automation-intro.md).
@@ -191,7 +191,7 @@ When you enable Change Tracking and Inventory, two new tables are created in you
191191

192192
### Sample log queries
193193

194-
- List all services and daemons that have recently started.
194+
- **List all services and daemons that have recently started.**
195195

196196
```kusto
197197
ConfigurationChange
@@ -200,8 +200,7 @@ When you enable Change Tracking and Inventory, two new tables are created in you
200200
| sort by Computer, SvcName
201201
```
202202
203-
- Alert when a specific service stops.
204-
Use this query in a log alert rule.
203+
- **Alert when a specific service stops.** Use this query in a log alert rule.
205204
206205
```kusto
207206
ConfigurationData
@@ -212,8 +211,7 @@ Use this query in a log alert rule.
212211
| summarize AggregatedValue = count() by Computer, SvcName, SvcDisplayName, SvcState, bin(TimeGenerated, 15m)
213212
```
214213
215-
- Alert when one of a set of services stops.
216-
Use this query in a log alert rule.
214+
- **Alert when one of a set of services stops.** Use this query in a log alert rule.
217215
218216
```kusto
219217
let services = dynamic(["omskd","cshost","schedule","wuauserv","heathservice","efs","wsusservice","SrmSvc","CertSvc","wmsvc","vpxd","winmgmt","netman","smsexec","w3svc","sms_site_vss_writer","ccmexe","spooler","eventsystem","netlogon","kdc","ntds","lsmserv","gpsvc","dns","dfsr","dfs","dhcp","DNSCache","dmserver","messenger","w32time","plugplay","rpcss","lanmanserver","lmhosts","eventlog","lanmanworkstation","wnirm","mpssvc","dhcpserver","VSS","ClusSvc","MSExchangeTransport","MSExchangeIS"]);
@@ -232,7 +230,7 @@ Port monitoring verifies that a machine is listening on a particular port. Two p
232230
### Dependency agent tables
233231
If you're using VM insights with **Processes and dependencies collection** enabled, you can use [VMConnection](/azure/azure-monitor/reference/tables/vmconnection) and [VMBoundPort](/azure/azure-monitor/reference/tables/vmboundport) to analyze connections and ports on the machine. The `VMBoundPort` table is updated every minute with each process running on the computer and the port it's listening on. You can create a log query alert similar to the missing heartbeat alert to find processes that have stopped or to alert when the machine isn't listening on a particular port.
234232
235-
- Review the count of ports open on your VMs to assess which VMs have configuration and security vulnerabilities.
233+
- **Review the count of ports open on your VMs to assess which VMs have configuration and security vulnerabilities.**
236234
237235
```kusto
238236
VMBoundPort
@@ -242,14 +240,14 @@ If you're using VM insights with **Processes and dependencies collection** enabl
242240
| order by OpenPorts desc
243241
```
244242
245-
- List the bound ports on your VMs to assess which VMs have configuration and security vulnerabilities.
243+
- **List the bound ports on your VMs to assess which VMs have configuration and security vulnerabilities.**
246244
247245
```kusto
248246
VMBoundPort
249247
| distinct Computer, Port, ProcessName
250248
```
251249
252-
- Analyze network activity by port to determine how your application or service is configured.
250+
- **Analyze network activity by port to determine how your application or service is configured.**
253251
254252
```kusto
255253
VMBoundPort
@@ -259,7 +257,7 @@ If you're using VM insights with **Processes and dependencies collection** enabl
259257
| order by Machine, Computer, Port, Ip, ProcessName
260258
```
261259
262-
- Review bytes sent and received trends for your VMs.
260+
- **Review bytes sent and received trends for your VMs.**
263261
264262
```kusto
265263
VMConnection
@@ -268,7 +266,7 @@ If you're using VM insights with **Processes and dependencies collection** enabl
268266
| render timechart
269267
```
270268
271-
- Use connection failures over time to determine if the failure rate is stable or changing.
269+
- **Use connection failures over time to determine if the failure rate is stable or changing.**
272270
273271
```kusto
274272
VMConnection
@@ -280,7 +278,7 @@ If you're using VM insights with **Processes and dependencies collection** enabl
280278
| render timechart
281279
```
282280
283-
- Link status trends to analyze the behavior and connection status of a machine.
281+
- **Link status trends to analyze the behavior and connection status of a machine.**
284282
285283
```kusto
286284
VMConnection

0 commit comments

Comments
 (0)