Here you go. This is the non-realtime version (Browser does not update dashboard in realtime, but this is also possible. Ask if interested). It will collect all log files, copy to my machine into a single log file
#!/bin/bashrm html/index.html #remove old filesrm log/nginx.log # remove old filestouch html/index.html # create empty new html# open ssh connection to host in terminal mode# and tail all logfiles from the server## now grep through the whole thing and exclude log entries which# fulfill some pattern defined in excludelist.txt# (useful for excluding dates, IPs, non-interesting routes, ...)##
ssh -t$(whoami)@<HOSTNAME> tail-q-n +0 /var/log/nginx/access* | grep-v-f excludelist.txt > log/nginx.log
#open the created html file (still empty) in browser
google-chrome html/index.html &
# now use goaccess on our collected log file and use some config# file which describes how to draw the dashboard
goaccess --no-global-config--config-file=./data/goaccess.conf --log-file=log/nginx.log
Press F5 in browser to reload the created html file.
There is much room for optimization :) but it just works and I am happy with it :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here you go. This is the non-realtime version (Browser does not update dashboard in realtime, but this is also possible. Ask if interested). It will collect all log files, copy to my machine into a single log file
Press F5 in browser to reload the created html file.
There is much room for optimization :) but it just works and I am happy with it :)