A Flask extension that uses Pyctuator to enable Spring Boot Admin (SBA) to monitor health, configuration, log-file and resource-usage of a Flask application.
Please see Pyctuator for the complete documentation and note that the some features such as monitoring memory/disk usage require instlaling of additional modules.
- Install Flask and the flask-pyctuator extension using your favorite python package manager
- Start a local SBA (Spring Boot Admin) server using Dockers:
docker run --rm -p 8080:8080 --add-host=host.docker.internal:host-gateway michayaak/spring-boot-admin:2.2.3-1
- Open SBA's main page, http://localhost:8080, in your browser
- Run the following Flask application:
from flask import Flask from flask_pyctuator.flask_pyctuator import FlaskPyctuator app = Flask("Flask App with Pyctuator") @app.route("/") def hello(): return "Hello World!" FlaskPyctuator( app, pyctuator_endpoint_url="http://host.docker.internal:5000/pyctuator", ) app.run(debug=False, port=5000, host="0.0.0.0")
See the complete example and project file in the example
folder.