Skip to content

Instantly share code, notes, and snippets.

@anarchivist
Created January 22, 2026 00:05
Show Gist options
  • Select an option

  • Save anarchivist/032d720a94aa1c5551d6c7d3cd167d0b to your computer and use it in GitHub Desktop.

Select an option

Save anarchivist/032d720a94aa1c5551d6c7d3cd167d0b to your computer and use it in GitHub Desktop.
cloudwatch insights query to IP address in traefik logs into octets
fields @timestamp, @message
| filter RequestHost like 'HOSTNAME'
| parse ClientHost /(?<octet1>\d{1,3})\.(?<octet2>\d{1,3})\.(?<octet3>\d{1,3})\.(?<octet4>\d{1,3})/
| stats count(*) as ClientHostCount by octet1, octet2
| sort ClientHostCount desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment