我想在 Azure 工作簿中创建可选下拉参数。
创建下拉参数有了本指南 https://%20https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-dropdowns#creating-a-dynamic-drop-down-parameter很简单
然后就可以在KQL中引用该参数了如示例所示 https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-dropdowns#in-kql with
requests
| where name == '{RequestName}'
到目前为止一切都很好,我现在希望这个参数是可选的,如果没有在下拉列表中选择一个值来获取所有未过滤的结果,就像我会得到的那样|where
部分根本不存在。现在,如果未设置此参数,那么我会得到一个Query could not be parsed error
.
这可能吗?
requests
| where isempty('{RequestName}') or (name == '{RequestName}')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)