Forum Discussion
loadedlouie270
Feb 24, 2022Copper Contributor
Deploying Azure Monitor Alert Rules by Pipeline gives error
Hi all, 🙂
Context:
I'm deploying a ARM Template in a Azure Devops pipeline...
The target is an Application Insights, and the query returns results.
This ARM template works, and it's valid, it has been deployed on VisualStudio without a problem.
But when I go to deploy the same ARM Template, on a pipeline in DevOps , I get the following error:
--------------------------------------------------------------------
"error": {
"message": "The request had some invalid properties",
"code": "BadArgumentError",
"correlationId": "",
"innererror": {
"code": "SemanticError",
"message": "A semantic error occurred.",
"innererror": {
"code": "SEM0100",
"message": "'where' operator: Failed to resolve column or scalar expression named 'timestamp'"
}
I deleted the correlation id value on purpose on the error up, its not missing 🙂
--------------------------------------------------------------------
I know that this error can be thrown by a non-existing Column, but this is not the case.
The column exists on the table, and it's the equivalent to Timegenerated on LAW ...
The query is the following:
--------------------------------------------------------------------
dependencies
| summarize ResponseDurationMS = percentile(duration,95) by timestamp, operation_Name
| where ResponseDurationMS >2000
| order by ResponseDurationMS desc
--------------------------------------------------------------------
So I need some help.
Not really sure if, the name "timestamp" used in the query,
is also used on the pipeline by default/design somehow...
and when parsed on a query, it needs "special" escapes caracter or something... like the \" per example.
I tried to use
column_ifexists(timestamp), without success.... and even extend to a new column as a todate(), also without success...
I can use and deploy the same template, if i just remove the timestamp from the query.... but, i really want the timestamp column there..
Any thoughts.?
Thanks in advance to all ...
- yalavi
Microsoft
loadedlouie270 Please check that the permissions of the deployment provide access to the logs.
The best option if you provide the correct permissions, is to open a support case with the correlation ID, and we will be able to check why this is happening on the service side.
- loadedlouie270Copper ContributorHi Yaniv, thanks for the reply,
I know this is a "strange" behavior, and I know I got access because,
if I run the pipeline, without that column on the query, it deploys perfectly without errors, the exact same query,just without that column...
So I'm guessing I got access to it, or am I confused,
and not understanding / seeing it wrong ?
Thanks for your time by the way.