Giter Site home page Giter Site logo

servertrack's Introduction

Introduction

2 hour ServerTrack challenge. Note the Dropwizard example application was used as a starting point for this project.

Overview

Server Load This specific challenge is called ServerTrack and allows you to demonstrate how you might implement a basic server monitoring system.

In this project, two API endpoints are necessary. They are:

  1. Record load for a given server This should take a:

server name (string) CPU load (double) RAM load (double) And apply the values to an in-memory model used to provide the data in endpoint #2.

  1. Display loads for a given server

This should return data (if it has any) for the given server:

A list of the average load values for the last 60 minutes broken down by minute A list of the average load values for the last 24 hours broken down by hour Both endpoints would be under a continuous load being called multiple times a second. There is no need to persist the results to storage.

Running The Application

To test the example application run the following commands.

  • To package the example run.

      mvn package
    
  • To setup the h2 database run.

      java -jar target/ServerTrack-0.8.0-rc2-SNAPSHOT.jar db migrate example.yml
    
  • To run the server run.

      java -jar target/ServerTrack-0.8.0-rc2-SNAPSHOT.jar server example.yml
    
  • To post data into the application.

    curl -H "Content-Type: application/json" -X POST -d '{"serverName":"name","cpuLoad":"33.3","memLoad":"22.2"}' http://localhost:8080/records

or type the following into the browser

http://localhost:8080/records?serverName=name&cpuLoad=33.3&memLoad=22.2

servertrack's People

Contributors

elukewalker avatar

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.