VICENTE RUIZ

June 12, 2025

Full-Stack Flask Website with ManageEngine APM

This project involved building and deploying my portfolio site using Flask, hosted on an Ubuntu 22.04 LTS virtual machine on DigitalOcean. The main focus was integrating performance monitoring through ManageEngine’s Applications Manager and APM Insight Python Agent.

Project Overview

The site is hosted on a DigitalOcean droplet, reverse-proxied through Nginx, and served via Gunicorn. I also added HTTPS through Let's Encrypt and linked my domain using Porkbun DNS. To monitor performance, I installed ManageEngine Applications Manager and added the APM Insight Python agent to the Flask backend.

Documentation I followed:

Installation Process

I created a droplet, configured DNS and firewalls, and installed all necessary packages for running Flask in production. I then installed Applications Manager using its `.bin` installer, selected PostgreSQL, and configured it to use ports 9090 and 8443. Afterward, I unzipped and installed the APM Insight Python Agent into my Flask project and added the necessary `initialize_agent()` code to my `main.py`.

Route Monitoring

The APM dashboard shows three requests to a non-existent route /falseroute. These were generated manually by visiting vicenteruiz.dev/falseroute to test how ManageEngine tracks invalid or error-prone traffic. Even though the route doesn't exist, the APM captures the attempted access, showing collection times and error counts. This confirms that custom or malformed route activity is being monitored properly, which is useful for tracking 404s or probing behavior.

Falseroute APM Monitoring
Error Analysis

The error log reveals repeated unauthorized or suspicious request attempts to common WordPress or admin paths such as /wp-admin/setup-config.php, /remote/login, and /+CSCOE+/*. These are likely automated vulnerability scans or bot probes. Even though the site is a Flask app with no WordPress backend, the APM detects and logs these requests. This highlights the importance of server hardening and monitoring for attempted exploits, even if they’re irrelevant to the actual tech stack.

Error Traffic APM Monitoring