Server Status Page
I developed a status page that was a monitoring solution for complex services. It was built with a Bootstrap CSS frontend and SVG graphics, and used Flask and Jinja templates to generate the content. The system was designed to regularly ping the services being monitored and measure their response time. This data was then stored on a temporary database and used to create visualizations and provide an overview of the status of each service on the page.
The first step was to decide on the tools and technologies to use. After giving a spin in Python Flask, I began working on the backend code to fetch data from each of the services and calculate the response times.
In my status page project, I used Jinja templates to generate the HTML content of the page dynamically based on the data fetched from the pinged services. The Jinja templates contain placeholders for the dynamic content, which are replaced with the actual values at runtime.
Jinja templates where saved as separate files in the project directory and contain the HTML code with placeholders for the dynamic content. When the Flask application receives a request for the status page, it uses the appropriate Jinja template to generate the HTML content for the page by using the uptime metrics.
That way, every requests to the page would provide an up to date metrics data. The issue was that people staying on the page won’t receive updates…
I first created a Flask REST route that would return the latest data from the backend as a JSON object. Then, I used jQuery’s
$.ajax() method to periodically poll the REST endpoint for new data. When new data was returned from the server, I parsed the JSON response and updated the page with the new information.
This approach had several advantages :
- It reduced the server load by only fetching new data when necessary.
- It provided users with the most up-to-date information without requiring them to refresh the page manually.
- It created a more seamless user experience overall, making the status page more engaging and easier to use.
Next, I worked on the frontend design, creating the visualizations and implementing the Bootstrap and SVG components.
Bootstrap is an extremely powerful front-end framework that helped me build a responsive webpage quickly and efficiently. With a wealth of pre-built components, such as grids, typography, forms, and icons, I was able to easily structure and style my page without having to worry about the nitty-gritty details of CSS and HTML. Bootstrap also comes with a host of built-in classes for handling responsiveness, which allowed my webpage to look great on any device, whether it be a desktop, ore tablet.
By using a CSS framework with built-in components like Bootstrap, I was able to focus more on crafting a great user experience, rather than getting bogged down in the technical details of website design.
The status page is a powerful tool that made monitoring complex services much easier. It allowed users to see the status of all monitored services in a single place, and the visualizations made it easy to quickly identify any issues.
Additionally, the ability to publish updates to a webhook and compute uptime made the system even more valuable for ensuring the reliability of the monitored services. I subscribed it to my instant messenger and got realtime information about downtimes and high response time from servers, saving me time and helping being more reactive.
A better file listing
Frustrated from the Apache default index page, I decided to write a simple single file web app under constraints
Based on the lightweight ØMQ protocol, this tool was a hands-on message broker project.
It integrates a Flask based REST API and a Bootstrap 4 front-end with Jinja2 templates. MMAP was the chosen way of transporting data.
ETL Search Engine
This tool was made to provide search capacity among ETL-extracted sensor data.
It was using a synoptic parser and a fast-index search library.
Want more ?
I've got a lot of other awesome projectsSee them all !