Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of using Azure Monitor to monitor Process in Windows system

Shulou Source: shulou.com Published: 2022-06-03 05:27:27 11月09日 Update

In common monitoring scenarios, in addition to monitoring server performance and service health, we also need to monitor the health of certain processes. In Azure Monitor, we can treat process IDs as performance counters to monitor process health.

Each process writes a number of values to the performance counters. Azure Monitor does not collect these values by default, but we can easily see them in Windows Performance:

Configure collection process data

We can configure Azure Monitor to monitor processes as performance counters, using notepad as an example:

In the Log Analytics workspace, click "Advanced settings"--"Data"--"Windows Performance Counters" and add "Process[notepad]\ID Process":

View collected data

Once configured, we can query notepad's process ID using the following query: If the Notepad program is not running, there is no data. If Alert needs to be set, alert rules can be configured to generate alerts when zero results are returned within the last X minutes.

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

Tags: Processes monitoring running configuration performance data status counters values methods alerts services queries sex scenarios workspaces common situations servers programs Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Tech Info OPPO Reno NVidia macOS