Created
January 16, 2015 14:08
-
-
Save jalberto/7673c51727059920b1f6 to your computer and use it in GitHub Desktop.
Basic console dashboard (tmux/byobu)
This file contains 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
#!/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 |
This file contains 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
#!/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