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.
Main website and live demo at http://server-monitor.herokuapp.com/
- 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!
Download and install Opa, then compile the single file:
opa main.opa
Create an app on Dropbox website and use the app keys to start the application:
./main.js --db-remote:monitor app-key:app-secret
- Blog post: the tutorial
- tl;dr: have a look at the commits list: this is how the application was built, step by step.