Resource Monitoring application with API endpoints to start and stop logging system load. Great for testing system loads in specific scenarios
All files are saved to out folder in the project root directory
There are several ways to launch the application
To launch from the source code, make sure you have Python 3.9 installed and do the following commands:
pip install -r requirements.txt
python app.pyOfficial Docker image can be pulled by using this command
docker pull ghcr.io/eerikas/resmonIt's best to use docker compose for easiest deployments, the example can be seen in the docker-compose.yml file.
-
/start/<name>: Starts logging to a file that is called<name>.csv- Response if logging is successful:
{"logging": "started"} - Response if another logging process is ongoing:
{"error": "already running"}
- Response if logging is successful:
-
/stop: Stops the logging process, returns the response{"logging": "stopped"} -
/serve/<file>: Downloads log file in csv format or returns error if it was not found -
/status: Returns status of the logging process- Response if logging is ongoing:
{"logging": "ongoing"} - Response if logging status is stopped:
{"logging": "stopped"}
- Response if logging is ongoing:
-
/clean: Deletes all logs. Logging must be stopped for the operation to work.- Response if logging is ongoing:
{"error": "logging is ongoing"} - Response if deletion was successful:
{"logging": "logs removed"}
- Response if logging is ongoing: