Linux

Ubuntu Logs Journalctl and Dmesg

Submitted by Greg Nowak on 2021-09-23

You can see a lot of good information for debugging and fixing errors on your Ubuntu server with journalctl and dmesg

journalctl --since "1 days ago"

journalctl --since "10 hours ago"

journalctl --since "12 hours ago" -p 3 -x --utc --no-pager

dmesg | less

dmesg -H --time-format iso| less

Resources:

https://unix.stackexchange.com/questions/50098/linux-network-troublesho…

Nagios Check HTTP notes

Submitted by Greg Nowak on 2021-09-06

Example bash on argument 1. It checks if HTTPS is up and if the domain-name is on the site. Most sites have the domain name on the front page somewhere: /usr/local/nagios/libexec/check_http -H $1 --ssl --onredirect=follow --string "$1"

If log file you can run grep on the following keywords: grep -i -e "critical" -e "invalid" -e "warning"  [LOGFILE.log]

Keywords: check_http