Skip to content
Browse files

Doc and license updated

  • Loading branch information...
1 parent 22fe1a8 commit 8fc938a3c02f8b8b4f9f8edeb199d00999915db2 @cedricss committed
Showing with 63 additions and 2 deletions.
  1. +53 −2 README.md
  2. +10 −0 main.opa
View
55 README.md
@@ -1,2 +1,53 @@
-server-monitor
-==============
+Server Monitoring based on Dropbox
+==================================
+
+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 <a href="http://server-monitor.herokuapp.com/">http://server-monitor.herokuapp.com/</a>
+
+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 sever 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 <a href="http://opalang.org">Opa Framework</a> and to present a Dropbox-based database use case. The <a href="http://server-monitor.herokuapp.com/demo">demo</a> will stop monitoring your servers as soon as you close the page: fork the project and make you own production-ready version!
+
+Compile
+-------
+
+<a href="http://opa.io">Download and install Opa</a>, then compile the single file:
+
+ opa main.opa
+
+
+Run
+---
+
+<a href="https://www.dropbox.com/developers/apps">Create an app on Dropbox website</a> and use the app keys to start the application:
+
+ ./main.js --db-remote:monitor app-key:app-secret
+
+
+Tutorial
+--------
+
+Have a look at the <a href="https://github.com/cedricss/server-monitor/commits/master">commits list</a>: this is how the application was built, step by step.
View
10 main.opa
@@ -1,3 +1,13 @@
+/*
+ Copyright © 2012 Cedric Soulas, MLstate
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
import stdlib.themes.bootstrap.{css, icons, responsive}
type status = { timeout } or { unreachable } or { unknown_error } or { error_simulation } or { ok }

0 comments on commit 8fc938a

Please sign in to comment.
Something went wrong with that request. Please try again.