azurepowershellazure-monitoringazure-servicebus-subscriptions

Azure powershell script for delivering logs information


I'm using some Azure service and would like to monitor the status of all its connections.

Since log analytics doesn't give me the appropriate metrics to monitor / watch the connection status, I need to develop my own powershell script (with azure CLI) to retrieve the required information.

Where can i execute this powershell script on schedule in order to deliver the latest status information to log analytics?


Solution

  • Where can i execute this powershell script on schedule in order to deliver the latest status information to log analytics?

    To run PowerShell Commands on a regular time/ Schedule:

    For Scheduling, you can use Schedules and create a schedule:

    enter image description here

    Then you can run your PowerShell script in Runbook after Creating it.

    enter image description here

    After creating in runbook:

    enter image description here

    Here i have given sample code, you can typr your powershell script here.

    Output:

    enter image description here

    For Further you can refer this.