Use Azure Monitor to monitor Process

Common monitoring scenarios, in addition to our performance, the Health Service monitor server, but also need to monitor the health of certain processes. In Azure Monitor, we can process ID regarded as performance counters to complete the operation of the monitoring process.

Each process will write a lot of value in terms of performance counters. By default, Azure Monitor is not going to collect these values, but we can easily see in Windows Performance in:
Use Azure Monitor to monitor Process

Configuring data collection process
we can use the following ways to configure Azure Monitor performance counters in the manner of the monitoring process, with notepad in this example:
Click "Advanced settings" in the Log Analytics workspace - "Data" - "Windows Performance Counters" , adding "Process [notepad] \ ID Process ":
Use Azure Monitor to monitor Process

View data collected
after the configuration is complete, we can use the following query to query notepad process ID. If Notepad is not running, there is no data. If you need to set up Alert, alert rules can be configured to generate alerts when returns zero results in the last X minutes.

Perf
| where InstanceName == "notepad"
| extend localTimestamp = TimeGenerated + 8h
| where TimeGenerated > ago(5m)
| project TimeGenerated , CounterValue, InstanceName
| order by TimeGenerated desc

Use Azure Monitor to monitor Process

Guess you like

Origin blog.51cto.com/wuyvzhang/2472565