@Ieuan Walker Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this,
I understand that you are looking for a resource graph explorer query to check whether app service is enabled with application insights or not.
Ideally, when you enable the app insights to a particular app service, the instrumentation key of app insight instance will be stored as application setting in app service.
All the app service siteConfig
properties will be stored in appserviceresources
table
In order to meet your requirement, you need to create the query using both resources & appserviceresources
tables as shown below.
Here is the sample query which helps to pull the list of app service with no application insights enabled.
resources
| where type == "microsoft.web/sites" and ['kind'] in ( "app","app,linux","app,linux,container","app,container,windows")
| join ( appserviceresources) on $left.name == $right.name
| project properties1.AppSettings,name,resourceGroup1
| where properties1_AppSettings !contains "APPLICATIONINSIGHTS"
Note: Please do modify the above query based on your requirement.
Hope this helps, let me know if you have any further questions on this.
Please accept as "Yes" if the answer is helpful so that it can help others in the community.