Lots of updated roles

This commit is contained in:
2020-05-12 17:07:38 -06:00
parent 5a9254097e
commit 6bb3e3f34f
35 changed files with 264 additions and 125 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Parse haproxy log for yesterday
# Find all errors codes >= 400
# Convert output to CSV format and save on xenstore :)
# mReschke 2012-05-11
yesterday=$(date --date "$dte -1 days" '+%Y-%m-%d')
log_src=/store/data/Production/log/Xenlb/haproxy/${yesterday}_Log.csv
log_dest=/store/data/Production/log/Xenlb/haproxy/${yesterday}_ErrorLog.csv
touch /tmp/haproxy_create_error_log.alive
#this was for the old csv log
#cat $log_src \
# | awk -F\",\" '{ if (substr($3,1,1) > 3) { print $0 }}' \
# > $log_dest
cat $log_src \
| awk -F\ '{ if (substr($11,1,1) > 3) { print $0 }}' \
> $log_dest
chown {{ superuser }}:{{ superuser }} $log_dest