Skip to content

Instantly share code, notes, and snippets.

@dooferlad
Created August 2, 2019 12:04
Show Gist options
  • Save dooferlad/3ce7e7d3276d5ede5fea039febd37dbb to your computer and use it in GitHub Desktop.
Save dooferlad/3ce7e7d3276d5ede5fea039febd37dbb to your computer and use it in GitHub Desktop.
Search Loggly on the command line
curl -H 'Authorization: bearer $LOGGLY_APIKEY' "http://octoenergy.loggly.com/apiv2/events?rsid=$(curl -H 'Authorization: bearer $LOGGLY_APIKEY' "http://octoenergy.loggly.com/apiv2/search?q=$1" | jq .rsid.id | xargs)" | jq $2
@dooferlad
Copy link
Author

dooferlad commented Aug 2, 2019

Obviously need to set $LOGGLY_APIKEY as well as install curl and jq.
Usage:
logglyq <search> <query>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment