Skip to content

Instantly share code, notes, and snippets.

@TheSkorm
Created July 3, 2019 10:00
Show Gist options
  • Save TheSkorm/44788fa4a11dbd7114da3823050ed723 to your computer and use it in GitHub Desktop.
Save TheSkorm/44788fa4a11dbd7114da3823050ed723 to your computer and use it in GitHub Desktop.
Sonde ES to CSV
GET sonde_packets/_search
{
"size" : 10000,
"query": {
"match": {
"serial": {
"query": "RS_N4440477"
}
}
}
}
cat N4440477 | jq -r '.hits["hits"][]._source | [.frame, .time_created, .time, .location.lat, .location.lon, .alt, .temp, .humidity, .receivers] | join(", ")' |sort -n > N4440477.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment