Skip to content

Instantly share code, notes, and snippets.

@jalberto
Created January 16, 2015 14:08
Show Gist options
  • Save jalberto/7673c51727059920b1f6 to your computer and use it in GitHub Desktop.
Save jalberto/7673c51727059920b1f6 to your computer and use it in GitHub Desktop.
Basic console dashboard (tmux/byobu)
#!/bin/bash
plexer=byobu
$plexer send-keys -t 0.0 '' C-m
$plexer send-keys -t 0.0 nice\ goaccess\ -f\ /var/log/nginx/access.log C-m
$plexer splitw -t 0
$plexer select-layout -t 0 main-horizontal
$plexer send-keys -t 0.1 '' C-m
$plexer send-keys -t 0.1 sudo\ watch\ -n5\ -d\ nice\ passenger-status C-m
$plexer splitw -t 0
$plexer select-layout -t 0 main-horizontal
$plexer send-keys -t 0.2 '' C-m
$plexer send-keys -t 0.2 watch\ -n300\ -d\ nice\ sh\ ./fail2ban-report.sh C-m
$plexer splitw -t 0
$plexer select-layout -t 0 main-horizontal
$plexer send-keys -t 0.3 '' C-m
$plexer send-keys -t 0.3 nice\ htop\ -d\ 100 C-m
$plexer select-layout -t 0 main-horizontal
$plexer select-pane -t 0.0
$plexer select-window -t 0
#!/bin/bash
grep "Ban " /var/log/fail2ban.log | awk -F[\ \:] '{print $10,$8}' | sort | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment