All Projects → cedricss → server-monitor

cedricss / server-monitor

Licence: other
Dropbox as a Database - Demo

Programming Languages

Opa
4 projects

Server Monitoring using Dropbox as a Database

Overview

Monitor the health of your servers and receive alerts when something goes wrong. This web application is built with the Opa technology and runs on top of a Dropbox-based database.

Demo

Main website and live demo at http://server-monitor.herokuapp.com/

Dropbox Storage

  • All your configured jobs and logs are saved on your personal Dropbox account. Nothing is stored on the application server.
  • If one of your severs goes down, a Dropbox popup will appear on your desktop.

The following code is a Dropbox database in Opa. Change the @dropbox annotation with @mongo and the app will run on top of MongoDB instead. It's that simple.

database monitor @dropbox {
    stringmap(log) /logs
    stringmap(job) /jobs
    /logs[_]/status = { ok } // Define the default "status" value
}

function add(name, url, freq){
	/monitor/jobs[name] <- (~{ url, freq })
}

Note: This application is a proof of concept, aim to learn the Opa Framework and to present a Dropbox-based database use case. The demo will stop monitoring your servers as soon as you close the page: fork the project and make you own production-ready version!

Compile

Download and install Opa, then compile the single file:

opa main.opa

Run

Create an app on Dropbox website and use the app keys to start the application:

./main.js --db-remote:monitor app-key:app-secret

Tutorial

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].