Skip to content

JonasGLund99/TimeTrace

Repository files navigation

TimeTrace | Timed Pattern Matching in Log Files

TimeTrace is deployed on Vercel; however, it is necessary to have an SSH-key to send request to the MONAA backend.

An SSH-key can be obtained by contacting either [email protected] or [email protected].

TimeTrace banner

React frontend

Clone the repository and cd into the project

cd TimeTrace

Install the necessary node packages

npm i

Start the project

npm start

MONAA backend

Because this project utilises MONAA that only runs on Ubuntu and Windows, a separate backend server has been set up and runs on CLAAUDIA Strato Compute Cloud. For the frontend to connect to CLAAUDIA, it is necessary with an SSH tunnel.

SSH tunnel setup

Step 1 - Private key Save your private key (<private_key.pem>) somewhere safe.

Step 2 - SSH Open a terminal and run the following ssh command:

ssh -i "path/to/private_key.pem" [email protected] -L 5000:localhost:5000

This will tunnel port 5000 on the server to localhost:5000.

Step 3 - Open browser Open your browser and go to localhost:3000 or time-trace.vercel.app where the TimeTrace frontend will be hosted.

Follow the guides on the home page on how to use TimeTrace.

You should not need anything else from this guide to use the tool unless you are a developer

Running tests

npm test

or

npm run testCoverage

SSH information

Start MONAA backend server

The MONAA backend is built using Flask. Use the following commands (when conencted via SSH) if the server is down.

cd monaa-backend

Optional: git pull

nohup python3 -m flask --app server run &

This should start the Flask server and you should be able to close the terminal without the server shutting down.

Check running Python processes and kill them

To check what Python processes are running, use the command:

pgrep python3

To kill a Python process, use the command:

sudo kill <process-id>

Postman

Import P6.postman_collection.json in your Postman App.

POST Body In the body select raw and add a JSON body of the format below. lines Is an array of strings symbolising the lines of the file uploaded.

regex Add a valid timed regular expression using the MONAA syntax.

Your request should look something like below

Postman example

Send your request and view the response