How to make a custom metric for log analytics from an Arc server?

Jonathan Posey 0 Reputation points
2024-07-17T20:23:22.64+00:00

I want to create a metric based on this powershell output that I'd generate regularly with a task on the machine:

Get-DhcpServerv4ScopeStatistics -ComputerName hostname

How can I turn this into a metric that I can feed into log analytics?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,014 questions
Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
383 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 22,251 Reputation points MVP
    2024-07-18T06:08:13.2533333+00:00

    Hi,

    If you want to ingest any custom data you need to use Logs Ingestion API. I would suggest to do first the example to understand how the feature works before implementing it for your specific case.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments