These are the seven Dynatrace Query Language queries that detect six of the eight anti-patterns we hunt: bucket retention waste, DEBUG flowing into production, non-prod environments in production tier buckets, host-mode misalignment, broken service attribution, and noisy host groups.
fetch logs, from:now()-1h
| summarize cnt=count(), by:{log.source}
| sort cnt desc
| limit 20
fetch logs, from:now()-24h
| summarize count(), by:{loglevel}
| sort `count()` desc
fetch logs, from:now()-1h
| summarize records=count(), by:{dt.system.bucket}
| sort records desc
fetch dt.system.buckets
| fields name, dt.system.table, retention_days,
records, estimated_uncompressed_bytes
| sort estimated_uncompressed_bytes desc
fetch logs, from:now()-2h
| summarize cnt=count(), by:{k8s.namespace.name, k8s.cluster.name}
| sort cnt desc
fetch logs, from:now()-1h, scanLimitGBytes:50
| summarize cnt=count(), by:{dt.host_group.id}
| sort cnt desc
| limit 15
fetch logs, from:now()-1h, scanLimitGBytes:50
| filter loglevel == "DEBUG"
| summarize cnt=count(), by:{k8s.namespace.name, log.source}
| sort cnt desc
Run these seven queries, cross them with the bucket inventory, and within hours you have a defensible euro figure for the remediation backlog. The audit packages the analysis, the remediation steps, the DQL library extension, and a 3x savings guarantee.
See audit packages See the 8 anti-patterns