{"ID":"068fbbdf-1b8b-4f64-a2d7-6fb67e61a53a","VersionNumber":1,"Name":"XE - Running Session(s)","Description":"\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t

Alert on running XE Sessions.

 

Alerting on xe_create_time in the dm_xe_sessions table.

Also filtering out sessions that are built-in and running on startup.

WHERE clause can be adjusted as needed.

 

\r\n\r\n","AppliesToObjectTypeID":"0a11a887-823a-4461-87af-321cad1c3623","ConditionCategoryID":"805a84c9-7f1b-4b4d-a9ad-3dddcf9e0f17","OwnerObjectID":"b7c74f24-1a45-4115-8262-d7613878bbd6","OwnerObjectTypeID":"894de672-3fc0-4779-9a0d-880d4c207c77","RuleDefinition":"{\"OperationTypeID\":\"6c3d38f1-9317-4258-972a-cfee0a0d76b5\",\"Children\":[{\"OperationTypeID\":\"8fa3cd6a-960c-43bb-96e0-94092fc2c296\",\"ValueDataTypeID\":\"b35a57f5-b8f6-4e4e-9380-e9d328e3eabf\",\"Left\":{\"ValueTypeID\":\"aa61ee90-8a95-4fdf-a208-b9a4afa26d9d\",\"Database\":\"master\",\"Query\":\"SELECT ses.name,\\r\\nCASE\\r\\nWHEN xe.create_time IS NOT NULL THEN 1\\r\\nWHEN xe.create_time IS NULL THEN 0\\r\\nEND AS [XERunStatus]\\r\\nFROM sys.server_event_sessions AS ses\\r\\nLEFT OUTER JOIN sys.dm_xe_sessions xe ON ses.name = xe.name\\r\\nWHERE NOT (ses.name='AlwaysOn_health' OR ses.name='system_health' OR ses.name='telemetry_xevents')\",\"InstanceType\":1},\"ComparisonType\":2,\"Right\":{\"ValueTypeID\":\"07f87b7f-c063-47a2-a5be-772ba85ed827\",\"Value\":\"0\"},\"ID\":\"1\"}],\"BooleanOperationType\":0,\"ID\":\"0\"}","EvaluationFrequency":"00:01:00","IdlePeriod":"00:00:30","MaximumAllowedDuration":"00:00:05","AntiConditionID":"d649384c-884a-4d5d-8143-5dfc2a122ccb","MinWindowsVersion":null,"MaxWindowsVersion":null,"MinSQLServerVersion":null,"MaxSQLServerVersion":null,"MinSSASVersion":null,"MaxSSASVersion":null,"MinVmwareVersion":null,"MaxVmwareVersion":null,"MinSqlDbVersion":null,"MaxSqlDbVersion":null,"MaximumInstanceCount":100,"ColorIndicator":null,"Severity":0,"Signature":{"ConditionID":"068fbbdf-1b8b-4f64-a2d7-6fb67e61a53a","VersionNumber":1,"AppliesToObjectTypeID":"0a11a887-823a-4461-87af-321cad1c3623","RuleDefinition":"{\"OperationTypeID\":\"6c3d38f1-9317-4258-972a-cfee0a0d76b5\",\"Children\":[{\"OperationTypeID\":\"8fa3cd6a-960c-43bb-96e0-94092fc2c296\",\"ValueDataTypeID\":\"b35a57f5-b8f6-4e4e-9380-e9d328e3eabf\",\"Left\":{\"ValueTypeID\":\"aa61ee90-8a95-4fdf-a208-b9a4afa26d9d\",\"Database\":\"master\",\"Query\":\"SELECT ses.name,\\r\\nCASE\\r\\nWHEN xe.create_time IS NOT NULL THEN 1\\r\\nWHEN xe.create_time IS NULL THEN 0\\r\\nEND AS [XERunStatus]\\r\\nFROM sys.server_event_sessions AS ses\\r\\nLEFT OUTER JOIN sys.dm_xe_sessions xe ON ses.name = xe.name\\r\\nWHERE NOT (ses.name='AlwaysOn_health' OR ses.name='system_health' OR ses.name='telemetry_xevents')\",\"InstanceType\":1},\"ComparisonType\":2,\"Right\":{\"ValueTypeID\":\"07f87b7f-c063-47a2-a5be-772ba85ed827\",\"Value\":\"0\"},\"ID\":\"1\"}],\"BooleanOperationType\":0,\"ID\":\"0\"}","PublisherID":0,"PublishDateUtc":"2020-12-02T14:10:57","Rights":0,"SignatureVersion":1,"SignaturePublicKey":"uzJQ9gzevXFwOgw/hkcAtD+cA/bBbD1PRzhEZCxbZ6YwjJ1c9bbfXFItLQNwnm8bdWh2k57//qbpEj5DFHOW2EAjHc2Zw5m/vACm6OzelubPS5hbWvzshlaBJKm7KrpWQpPZClx/5eVvUVzOtlz+44RRTiOszObT58acJAQwA70=AQAB","Signature":"jLzTP2xTKNnWhihDDKZI4aYzuRwXDn+/9scHkesCklcEi3xWbAOedek4CXyfWvgnFsHyrGya3TtAswVDpSxyP2yhzZGaFOkR90IjsnNGw5O2L1Nel/IRVlZFsL3onJcH2/Zp0C1WlpZ2ZtumBnXir7obI6wW16uwAnKfQDN+MG8=","IsSelfPublishedCondition":true},"Tags":null,"Areas":[],"ConditionSystemVersion":3,"MinDBSchemaVersion":null,"MaxDBSchemaVersion":null,"Items":[]}