Azure Monitor Logs Time Range

Jason Kronick (CA) 6 Reputation points
2022-04-21T01:22:12.157+00:00

I am using the Azure Monitor Logs API connection to query logs from a Logic App and want to set a custom time range for the query.
194826-image.png

I have looked for documentation on how to format the time range input string but have not been able to figure it out. Does anyone have any insight?

Thank you!

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,805 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Monalla-MSFT 11,641 Reputation points
    2022-04-21T02:02:10.42+00:00

    Hello @Jason Kronick (CA) - Welcome to Microsoft Q&A and thanks for reaching out.

    You can set the time range in the query itself if you want to use any other values from the predefined value in the Time Range. The Time Range value will be changed to "Set in query"

    194879-image.png

    Hope this helps. and please feel free to reach out if you have any further questions.

    ------------------------------------------------------------------

    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.


  2. Andrew Blumhardt 9,496 Reputation points Microsoft Employee
    2022-04-21T02:13:23.373+00:00

    Strange. It is supposed to revert to "Set in query" or a drop down menu with the option for a custom value. Pulling the query in as a variable may be the issue. Have you considered adding the query directly? Just paste it in the field provided.


  3. Andrew Blumhardt 9,496 Reputation points Microsoft Employee
    2022-05-02T18:48:05.077+00:00

    If you print out the time value it has a specific format. I assume if you used an expression that produces the same date-time format or even hard code a value in another variable that might work.

    Expression: formatDateTime(utcNow(), 'M/d/yyyy, hh:mm:ss:fff tt')

    198255-2022-05-02-13-29-40.jpg

    0 comments No comments