Code Monkey home page Code Monkey logo

timetrace's Introduction

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

timetrace's People

Contributors

jonasglund99 avatar asbjoernjc avatar korfitz1dev avatar anderstoft20 avatar aatbct avatar aatranderstegl avatar

Stargazers

 avatar  avatar  avatar

timetrace's Issues

ViewLog

Design siden til at sammensætte TRE/ skrive TRE i input felt + vise matches i log

FindZones is running slowly

Start the next search where the previous one ended.

Idea: calculate the average time between each event.

  • Store the time of the first event
  • Store the time of the last event.

Input validering [FileUpload]

Skal ske mellem getfilelines og formatFile

Throw specifikke errors

Eksempelvis:

  • to ens events på samme tid
  • forkert formattering
  • osv.

LogFormatter

Implement a class that can be used to convert Log files into Monaa compliant files

formatLog: func(log)
removeUnmappedEvents: func(log)

Image

LogHandler (and children)

Create a class that takes the output of Monaa and converts it into time intervals, where we have to search

Image

  • LogHandler
  • SearchInterval
  • LogSearcher
  • MonaaMatch
  • Event

CreateMappings page

Denne side skal ses som det store på dette billede:

Image

Altså et komponent med et 'create mapping komponent' + mapping overview, så dataen kan flyde fra create mapping komponentet over i mapping overviewet. Det er sådan jeg forstår figuren.

Min ide er at man til højre har loggen og en søge funktion, hvor man så kan udvælge eventet og lave mappingen på den måde, så altså
log overview -> parent komponent -> map overview

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.