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,320 questions
Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
437 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 24,686 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.