Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. How can we create a query in AWS CloudWatch Logs Insights that lists all the words from logs in order of frequency?

How can we create a query in AWS CloudWatch Logs Insights that lists all the words from logs in order of frequency?

Scheduled Pinned Locked Moved Discuss
2 Posts 2 Posters 350 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mani0525
    wrote on last edited by
    #1

    I am dealing with cloudwatch logs, and I have a situation where I need to list all the words from the logs in order of their frequency. I have tried the following queries, but they haven't worked. If you could help, that would be greatly appreciated.

    Query1:
    fields @message
    | parse @message /(?\<word\>\[^\\s\]+)/
    | stats count() by word
    | sort count() desc
    
    Query2:
    fields @message
    | split " "
    | stats count(*) by \*
    | sort count\_* desc
    

    list of all the terms from the cloud watch logs listed in frequency order

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Is this somehow in the context of Cloudron? I am asking, since this is a Cloudron related forum, however it is totally possible that others here are maybe able to help you out.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search