GithubHelp home page GithubHelp logo

alorlea / cpumonitorservice Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 6.87 MB

A restful web service written in python in order to monitor CPU usage of multiple clients

License: MIT License

Python 100.00%

cpumonitorservice's Introduction

CPUMonitorService

A restful web service written in python in order to monitor CPU usage of multiple clients.

The project consists of a restful service written in python using flask to generate a rest api to list the cpu usage of multiple devices been tracked.

It also has the code of the cpuAgent which when runned it registers to the service and sends heartbeats with the cpu usage of the system. To send http requests, we make use of the requests library

Also a simple rest client is included which uses jQuery javaScript, twitter bootstrap framework and knockout in order to generate the views of the page and generate the ajax HTTP requests to fetch the information from the service.

To run the system, first you need to configure the project first you need to generate a virtual environment for python to run.

To do this on linux run for the monitor Service:

-python virtualenv.py flask -flask/bin/pip install flask -flask/bin/pip install flask-restful -flask/bin/pip install flask-httpauth

To launch service:

-flask/bin/python MonitorService.py

For the agent do similar:

-python virtualenv.py flask -flask/bin/pip install requests

To run the agent:

-flask/bin/python monitorAgent/cpuAgent.py [name-of-device]

Once the service is running, you can access the website on:

http://localhost:5000/index.html

NOTE: A simple login and authentication mechanism is available, it is disabled to simplify access If you reenable the authentication in the service, uncomment the segments of code refering to auth in both service and agent. Uncomment the corresponding parts for the client in static/index.html

Credentials are user: admin, pass: admin

cpumonitorservice's People

Contributors

alorlea avatar

Stargazers

Kim Thostrup avatar

Watchers

Kim Thostrup avatar James Cloos avatar  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.