Forum Discussion
Azure monitoring Kusto query
Arslan11 You put Computer != "NH-E2016-01.networkhg.org.uk" which would avoid this computer completely no matter what you put behind it, I think.
Also, you can create a group in log analytics (go to saved searches, there you can create a search as a group). Eg this is one group I have for servers that I want Critical patches to run upon in another group called EuropeServers:
Heartbeat
And in the EuropeNonCriticalPatch I have things like:
search "Heartbeat"
| where (Computer == "computerA" or Computer == "computerB" or Computer == "computerC" or Computer == "computerD")
| distinct Computer
So you could create something similar in your case.
Some other ideas, I prefer to reduce the amount of "or"'s and replace with an "in" or "!in"
search "Heartbeat"
| where Computer in ("computerA","computerB","computerC" ,"computerD")
| distinct Computer
or
let computerList = dynamic(["computerA","computerB","computerC" ,"computerD"]);
search "Heartbeat"
| where Computer in (computerList)
| distinct Computer
FYI,
Home - Azure - Azure Log Analytics (in another forum to use on this platform for KQL help)
- Arslan11Jun 11, 2020Copper Contributor
CliveWatson thanks my question towards, how can avoid one instance name not be monitored on a server instead of avoiding all the instance name when using the language specified below
and Computer != "NH-E2016-01.networkhg.org.uk" and InstanceName !contains ":E"