Skip to content

Instantly share code, notes, and snippets.

View danimality's full-sized avatar

Dan Wheatley danimality

  • Tassomai
  • London
View GitHub Profile
@danimality
danimality / count by device version (roughly)
Last active March 1, 2022 06:19
cloudwatch Insights Useful Queries
fields @timestamp, @message, @device
| parse @message '* (*) - - [*] "* * *" * * "*" "* (*) * (*) *"' as local, remote, date, method, call, protocol, status, bytes, url, web, device, kit, gecko, mob
| filter call like "/api/answer/"
| filter method = "POST"
| sort @timestamp desc
| stats count(*) as total by substr(device, 0,24)
| sort total desc
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js"></script>