Skip to content

Commit

Permalink
Tweak production syslog configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz committed Aug 21, 2021
1 parent 17a8e67 commit 0a627f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion production/mempool-logger
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
trap "" PIPE
while read input;do
if [ ! -z "${input}" ];then
echo "\`\`\`${input}\`\`\`" | /usr/local/bin/keybase chat send --nonblock --channel "$1" mempool.devops
echo "\`\`\`${input}\`\`\`" | /usr/local/bin/keybase chat send --nonblock --channel "$1" "$2"
fi
done
5 changes: 3 additions & 2 deletions production/mempool-restart-all
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env zsh
HOSTNAME=$(hostname)

echo restarting all mempool backends | wall
echo restarting all mempool backends | logger -t mempool -p local7.notice
echo restarting mempool backends | wall
echo "${HOSTNAME} restarted mempool backends" | /usr/local/bin/keybase chat send --nonblock --channel general mempool.devops
ps uaxw|grep 'dist/index'|grep -v grep|grep -v services|awk '{print $2}'|xargs -n 1 kill

exit 0
4 changes: 2 additions & 2 deletions production/syslog.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local7.>=notice |/usr/local/bin/sudo -u mempool /usr/local/bin/mempool-logger ops
local7.info |/usr/local/bin/sudo -u mempool /usr/local/bin/mempool-logger node100
local7.>=notice |/usr/local/bin/sudo -u mempool /usr/local/bin/mempool-logger mempool.devops general
local7.info |/usr/local/bin/sudo -u mempool /usr/local/bin/mempool-logger mempool.devops node100
local7.info /var/log/mempool
local7.* /var/log/mempool.debug

0 comments on commit 0a627f9

Please sign in to comment.