Skip to content

Instantly share code, notes, and snippets.

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 stahnma/1de68a5596fd5dd28bae5787c3fdd97d to your computer and use it in GitHub Desktop.
Save stahnma/1de68a5596fd5dd28bae5787c3fdd97d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Usage example: ./get_compiles 2017-09-27 05 06 07 08
DATE="$1"
shift
for x in "$@"
do
egrep "'Compiled catalog'|'Compiled static catalog'" /var/log/puppetlabs/puppetserver/puppetserver.log | grep "^$DATE $x:" | wc -l
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment