Troubleshoot issues using logs - KeegMitch/Operations-Engineering-group-c GitHub Wiki
Useful logging commands to troubleshoot
This is a page that's very important in figuring out any issues we have with configuration
systemd logs
journalctl -xejournalctl -f( the -f means the logs update in real time)journalctl -k(any kernel related errors)journalctl -p err(looking for any current errors)
Puppet logs
The puppet server, in this case it's our Management server
sudo tail -f /var/log/puppetlabs/puppetserver/puppetserver.logsudo tail -f /var/log/puppetlabs/puppetserver/puppetserver-status.logsudo tail -f /var/log/puppetlabs/puppetserver/puppetserver-access.log
Nagios logs
sudo tail -n 50 /var/log/apache2/error.logsudo less /var/log/nagios3/nagios.log
sudo less /var/log/puppetlabs/puppetserver/puppetserver.log | grep "ERROR"
Not so much a log but more so checking for any syntax/config errors for the nagios-related config files:
nagios3 -v <nagios-config-file>
Example: nagios3 -v /etc/nagios3/nagios.cfg
sudo journalctl -u nagios3 -n 50
Link: https://www.puppet.com/docs/pe/2019.8/log-locations-reference.html