Skip to content

druwadi/owl

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn

license-shield druwadi


Logo

Owl

A monitoring tool suite for your fleet of hosts, that include a collector and a web service UI. Basic features are currently implemented in its current state, and more to come!
Explore the docs »

Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

webapp screenshot

This project was originally created as a project for the author's Computer Science Capstone course. This tool suite combines a metrics collector that can be placed on a host to continuously send metrics to a InfluxDB data store, and a web service that can be used as a simplified monitoring dashboard.

Built With

Getting Started

To get a local copy up and running follow these simple steps below.

Prerequisites

You will need the following installed prior to running this locally.

MacOS

  • Python
    brew install python
  • Docker
    brew install docker
  • Docker Compose
    brew install docker-compose

Windows

  • Python
  • Docker Note: docker-compose is included on Windows Docker Desktop installation.

Installation

  1. Clone the repo
    git clone https://github.com/druwadi/owl.git
  2. Change directory into the parent directory owl
    cd owl
  3. Run Docker Compose
    docker-compose up
  4. Navigate to http://localhost:8000
  5. To exit, CTRL+C on your keyboard, and run docker-compose down to clean up the network and containers.

Note: If you are developing against the project, you will want to take these additional steps below.

  1. Install all of the Python package dependencies locally
    pip3 install -r requirements.txt
  2. Any local changes you wish to test, you will need to run the following to re-build your docker image changes
    docker-compose build

Usage

This project was initially created and intended to be an open sourced version of several popular monitoring tools, but all in one, and without the additional fees that some monitoring tools may come with.

A little about how this project works, the project is broken up into two primary services and a data store.

The first service is the collector which lives under collector/collector.py. This is a Python program that will continuously run on your intended host to collect metrics. The current method for creating a binary with this file is to use Pyinstaller which is cross platform and will work on MacOS, Windows, and Linux, an example command on Linux/MacOS is here pyinstaller /usr/build/collector/collector.py --onefile. This creates a single binary file to run on your host. While this is running, it sends back metrics to the InfluxDB data store that is specified in the collector.py file. It accepts an input of a Python Dictionary, and the current primary library for pulling basic metrics is psutil.

The second service is the web service that is built in the Django framework. This can be located under the webservice directory from the root. This web service functions as a basic dashboard UI that pulls in graphs from the Plotly express library to display metrics from the InfluxDB data store. It also has a navigation sidebar with some useful links such as documentation.

The database chosen is a NoSQL time series database, InfluxDB. This was chosen for ease of use for time series events. Other NoSQL databases such as Cassandra or ACID databases such as Timescale (running PostgreSQL) could potentially be substituted in a fork with some light modifications.

The current architecture diagram is below, currently this is setup as a demo in Docker compose in the Getting Started section. This will build three containers (Web service, InfluxDB, and a Ubuntu system running the collector binary) in a network for demoing how this works. Note that the API between the database and webservice is actually the library API for InfluxDB and not a custom API.

webapp screenshot

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Twitter: @druwadi

Project Link: https://github.com/druwadi/owl

Acknowledgements