🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Web & Software Development › Deployment: Servers, CI/CD, and Cloud Publishing › Lesson 10
TEC-WEB46-07 · Lesson 10 · 12 clock hours · demo

Application Monitoring, Logs, and Uptime Checks

Objective. Students configure basic server and application monitoring—including log file review with journalctl, Nginx access/error log tailing, and a free uptime check—and respond to a simulated service failure.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Why Monitoring Matters

Deploying an application is not the finish line—keeping it running reliably is an ongoing responsibility. Servers crash, disks fill up, misconfigurations slip through, and traffic spikes happen without warning. Application monitoring gives you visibility into what your server and software are doing right now, what they did in the past, and whether your site is reachable by the outside world. Without monitoring, you learn about outages from angry users instead of automated alerts.

This lesson covers three core monitoring skills: reading system and service logs with `journalctl`, watching Nginx web server logs in real time, and setting up an external uptime check. You will also practice the professional habit of writing an incident report after a service failure.

Reading System Logs with journalctl

`journalctl` is the command-line tool for reading the systemd journal—the centralized log store used by most modern Linux distributions, including Ubuntu 20.04 and later. Every service managed by systemd writes structured log entries to the journal automatically.

Key flags you will use today:

Each log line contains a timestamp, hostname, process name, PID, and the message. When Nginx fails to start or encounters a configuration error, the journal entry will usually say exactly which file and line caused the problem. Read the full message before trying a fix.

Watching Nginx Access and Error Logs

Nginx writes two plain-text log files by default:

The command `tail -f /var/log/nginx/access.log` streams new lines to your terminal as requests arrive. This is invaluable for watching live traffic during a deployment or debugging session.

Reading HTTP status codes in the access log:

When you see a flood of 404s for the same path, someone may be scanning your site or a link on your page is broken. When you see 500s, your application code needs immediate attention.

External Uptime Monitoring

Log files tell you what happened on the server. They do not tell you whether a user in another city can reach your site. External uptime monitoring sends HTTP requests to your site from outside your network on a schedule and alerts you if it gets no response or gets an unexpected status code.

UptimeRobot offers a free tier that checks your site every five minutes and sends email alerts when a monitor goes down or recovers. To set up a basic monitor:

1. Create a free account at uptimerobot.com.

2. Click Add New Monitor, choose type HTTP(s).

3. Enter your site's URL and a friendly name.

4. Set the check interval (5 minutes on the free tier).

5. Add your email address as an alert contact.

6. Save the monitor.

Once active, UptimeRobot will notify you within minutes if your site stops responding. The free tier is sufficient for learning and small personal or student projects.

Responding to a Service Failure

When an alert fires, work through a quick mental checklist:

1. Confirm the outage — can you reach the site from your browser? Does `systemctl status nginx` show the service as failed or inactive?

2. Read the logs — run `journalctl -u nginx --since today` and check the error log. Find the first error message, not just the last one.

3. Fix the cause — restart the service with `sudo systemctl restart nginx` only after you understand why it stopped; otherwise it may fail again immediately.

4. Verify recovery — confirm the service is active (`systemctl status nginx`) and that your browser can load the site.

5. Document the event — write an incident report.

Incident Reports

An incident report is a brief professional record of what went wrong. A minimal report answers:

Writing incident reports is a professional habit that protects you and your team. It builds a searchable history of past failures so the same problem is not diagnosed from scratch next time.

Safety and Professional Notes

Log files can contain sensitive information—user email addresses, IP addresses, form data that leaked into URLs, and authentication tokens if logging is misconfigured. Treat log files as confidential. Do not paste raw logs into public chat rooms or forums without scrubbing personal data. On a shared or production server, log file permissions should allow only privileged users to read them. Always use your VPS account credentials responsibly and never test destructive commands on a system that serves real users without permission.

Key terms9

systemd journalA centralized, structured log store managed by systemd on modern Linux systems; accessed with the journalctl command.
journalctlA command-line utility for querying and displaying entries from the systemd journal, with options to filter by service unit, time, and priority.
HTTP status codeA three-digit number returned by a web server with every response, indicating whether the request succeeded (2xx), was redirected (3xx), failed due to the client (4xx), or failed due to the server (5xx).
tail -fA Linux command that streams new lines appended to a file to the terminal in real time, useful for watching live log output.
access logA log file written by Nginx (at /var/log/nginx/access.log by default) that records one line per HTTP request, including the client IP, method, URL, and status code.
error logA log file written by Nginx (at /var/log/nginx/error.log by default) that records problems encountered while processing requests or starting the service.
uptime monitoringAn external service that periodically sends HTTP requests to a website from outside the hosting network and sends alerts if the site does not respond as expected.
incident reportA brief written record of a service failure documenting who detected and resolved it, what was affected, when it occurred, and how it was fixed.
systemctlThe main command-line tool for controlling systemd services; used to start, stop, restart, enable, disable, and check the status of services.
In class: Use journalctl -u nginx --since today and tail -f /var/log/nginx/access.log to observe live traffic; instructor generates 404 and 500 errors and students identify them in real time. · Register the site with a free uptime monitoring service (such as UptimeRobot free tier) and configure an email alert; instructor stops the Nginx service to trigger a downtime alert, then students restart it. · Write a brief incident response note (who, what, when, how resolved) based on the simulated outage, following a provided incident report template.
Materials: Student VPS, Nginx, journalctl, UptimeRobot free account, incident report template, student notebooks
Check: Students correctly identify instructor-injected errors in the log within 3 minutes and restart the downed service independently; incident report is complete and submitted. Both required.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CompTIA Linux+: Linux system management and logging
1. Which command limits journalctl output to Nginx journal entries written since midnight of the current day?
CompTIA ITF+: IT concepts and network fundamentals
2. A developer sees a large number of HTTP 500 responses in the Nginx access log shortly after pushing new code. What is the most likely cause?
CompTIA ITF+: Infrastructure and cloud concepts
3. What is the primary advantage of external uptime monitoring over reviewing server-side logs alone?
CompTIA Linux+: Service management with systemd
4. After stopping Nginx with sudo systemctl stop nginx, which command would confirm the service is no longer running?
CompTIA ITF+: IT operations and professionalism
5. A student's incident report notes that Nginx stopped responding at 14:32 and was restarted at 14:47. Which element of a complete incident report is still missing from this example?
CompTIA Linux+: Linux filesystem and log management
6. Which file path contains the default Nginx error log on a standard Linux installation?
CompTIA ITF+: Security concepts and best practices
7. Why should raw log files be treated as confidential and scrubbed before sharing publicly?
CompTIA Linux+: Security and log analysis
8. A student uses tail -f /var/log/nginx/access.log and observes repeated requests for /admin/login returning a 404 status code. What does this most likely indicate?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.