Skip to content

Instantly share code, notes, and snippets.

@stenio123
Created May 20, 2019 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stenio123/d15f074ee7d88142cf95b933703ffa3f to your computer and use it in GitHub Desktop.
Save stenio123/d15f074ee7d88142cf95b933703ffa3f to your computer and use it in GitHub Desktop.
Script to list number of requests in a log file from Vault
# Number of requests on Vault
## Author: Ranjit
```
cat ~/vault.log | tr '\n' ',' | sed 's/^/[/' | sed 's/,$/]/' | jq '. | map(select(.type == "request")) | length'
```
## Author: Ancil
```
awk '/"type":"request"/{++cnt} END {print "Count = ", cnt}' vaultaudit.log
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment