Error Watching & Performance Monitoring

You need to be on the VPN to connect to our servers. Also: ‘NM’ stands for our New Media sandbox.

Here’s a list of all of the error watching and performance monitoring options available to us in ID & Webteam.

Immediate Logging w/Terminal

  • To watch all of the development sandbox error logs, open terminal and run the following two commands:
1

2

ssh ist-wp-app-devl101.bu.edu

tail -f /var/log/httpd/error_log

  • To watch just your sandbox, use this command instead and substitute your sandbox name (we’re using nm here):
1 tail -f /var/log/httpd/error_log | grep nm
  • To clear the list of errors, hit ⌘ + k in your terminal window.

Note: your computer user name may not be the same as your SSH user name. If this is the case, you’ll get an error that the password is incorrect. To fix, manually enter your user name in the SSH command:

1 ssh yourusername@ist-wp-app-devl101.bu.edu
Advanced Alias

You can create an alias in your .bashrc file on ist-wp-app-devl101 that allows an easy way to access tail. Once this is created, you can just type wptail into terminal.

  • SSH into ist-wp-app-devl101
  • vi .bashrc
  • Add the line below to the end of the file
1

2

#general aliases

alias wptail="tail -f /var/log/httpd/error_log"

“Historic” Logging w/ Splunk

Utilize IS&T’s Splunk account by logging in to our shared ID account.

Make sure you click the “Splunk App for AWS” in the top left and select “Splunk > lite”.

This is “historic” because of the ~2 minute delay between when events happen and when they flow into Splunk’s dashboard.

  • To see all of the development sandboxes, utilize the search at the top by typing the following:
1 index="wp-app-devl"
  • To see just your sandbox, use this command instead and substitute your sandbox name (we’re using nm here):
1 index="wp-app-devl" "nm.cms-devl.bu.edu"

Note the following handy features:

  • Timeline (orange & gray bar)
  • Time selector (right next to search button)
  • URL sharing (copy and paste it to your friends)

WP Query Monitor

We don’t want Query Monitor to be enabled on production [LIVE] sites unless necessary. Remember to disable it immediately after you’re done testing. Also disable it on a staging site before it launches.

Enable the Query Monitor plugin on sites in your sandbox.

Use Query Monitor to watch for errors, fatal errors, duplicate queries, slow queries, and query counts per page.

It also has a handy list of PHP template parts loaded on the current page, body classes, and conditionals.

New Relic Performance Monitoring

As of Oct 3, 2018, the WordPress monitoring part of the app has lost connection to our services. IS&T was last checking on it and will let us know if and when it has been restored.

Use IS&T’s New Relic Instance by logging into your individual account. This service will let us know how performant (or not) queries are, functions, hook, etc.