Created
May 20, 2019 13:01
-
-
Save stenio123/d15f074ee7d88142cf95b933703ffa3f to your computer and use it in GitHub Desktop.
Script to list number of requests in a log file from Vault
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
# 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