Created
August 30, 2016 18:03
-
-
Save salekseev/85920f907957f982cfd32a8231d9e964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
index="epriorauth" | |
date="2016-08-23" | |
broker="kafka100" | |
topic="structured_log_all" | |
kafkacat -b $broker -t $topic -C -o beginning \ | |
| jq --arg index "$index" --arg date "$date" -cM '{"@timestamp": .["@timestamp"], "@target_index": .["@target_index"]} | select(.["@target_index"]==$index) | select( .["@timestamp"] | startswith($date) )' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment