Skip to content

Instantly share code, notes, and snippets.

@dyipon
Created March 23, 2022 22:31
Show Gist options
  • Save dyipon/9e6fcda74072217dfd15fa1507545198 to your computer and use it in GitHub Desktop.
Save dyipon/9e6fcda74072217dfd15fa1507545198 to your computer and use it in GitHub Desktop.
curl -sSL -X GET 'http://es-for-logging-master:9200/filebeat*/_search?pretty' -H 'Content-Type: application/json' -d '{
    "query": {
        "query_string": {
            "query": "kubernetes.labels.app:helloworld"
        }
    },
    "size": 1000,
    "from": 0,
    "sort": [
            {
                "@timestamp": {
                    "unmapped_type": "keyword",
                    "order": "desc"
                }
            }
        ]
}' | jq '.hits.hits[] | ._source."@timestamp" + "> " + ._source.message'
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment