question

Alex-5595 avatar image
0 Votes"
Alex-5595 asked TravisCragg-MSFT commented

Send Azure Runbook Job Output

Hello i would like to send an email or at least write a log entry with a "Runbook Job Output" (not an Error)" where i could at least create a alert. Is this possible?

azure-automation
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Its a little embarrassing but i forgot to publish it, so now the warning works. with write-error i struggle still but warning is enough.

now i will have a look at the Log Analytics workspace and then create alert to notify you via email Option asap.

1 Vote 1 ·

Hi @Alex-5595,

Did you get chance to review my earlier response? Let me know if you have any further queries regarding it.

0 Votes 0 ·

Hello tbgangav at the moment i struggle with the write-error or write-warning in the powershell script i want to run. Works fine in the test run window, at least the warning messages. But on a scheduled Job i just habe the outputstream filled not the warning (error is anyway already in script with errors)?!

0 Votes 0 ·

Hi @Alex-5595,

If possible, can you share your runbook so I can try to reproduce the same issue and try to diagnose the issue in a better way?

In general, as shown in below screenshot, I was able to see warning / error in their respective streams.

90794-image.png

90809-image.png

90843-image.png

For more information w.r.t it, please refer this document. Adding a screenshot of the same for reference.

90795-image.png

0 Votes 0 ·
image.png (57.5 KiB)
image.png (52.2 KiB)
image.png (51.6 KiB)
image.png (117.1 KiB)

1 Answer

tbgangav-MSFT avatar image
0 Votes"
tbgangav-MSFT answered Alex-5595 commented

Hi @Alex-5595,

You can forward runbook job data to a Log Analytics workspace and then create alert to notify you via email. For more information w.r.t it, please refer this Azure document.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello tbgangav it worked in help with the document very well. Thank you alot.

0 Votes 0 ·