Changes between Initial Version and Version 1 of Check


Ignore:
Timestamp:
Oct 11, 2010, 10:11:18 AM (14 years ago)
Author:
dan.dragomir
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Check

    v1 v1  
     1= Watchdog =
     2
     3== What is the gateway watchdog ==
     4
     5The SENSEI Gateway Watchdog is a monitoring and control service for the SENSEI Gateway. It allows for remote starting, stoping and updating the gateway code and can report the version string and uptime of the currently running gateway binary.
     6
     7== Requirements ==
     8
     9 * Linux
     10 * g++, make
     11 * [http://www.alhem.net/Sockets/ Sockets C++ library] (Also included in lib/Sockets-2.3.7; make clean; make; make install)
     12 * libxml2
     13 * openssl, openssl-dev
     14
     15== Project Organization ==
     16
     17The watchdog shares its code with the gateway implementation and can be found in the [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway /gateway] folder in the SVN.
     18
     19 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/bin /bin] executables
     20 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/src /src] Gateway and Watchdog Code
     21 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/xml /xml] Location of resource descriptions
     22 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/lib /lib] Sockets++ library
     23 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/config /config] Configuration files (unused)
     24 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/log /log] Log files (unused)                               
     25== How to build it ==
     26
     27The top-level Makefile will build everything with the following, which places the executables in ./bin. Note that the executables must be run from the root of the project as shown below.
     28
     29{{{
     30make
     31./bin/watchdog
     32}}}
     33
     34To clean everything do
     35
     36{{{
     37make clean
     38}}}
     39
     40To build the Sockets++ library
     41
     42{{{
     43cd ./lib/Sockets-2.3.7
     44make clean
     45make
     46sudo make install
     47}}}
     48
     49== How to use it ==
     50
     51The watchdog must be run from the root of the project
     52
     53{{{
     54./bin/watchdog
     55}}}
     56
     57Available command line options are:
     58-p HTTPD port (default: 9000) [[BR]]
     59-s HTTPD hostname for inserting in resource desciption (default: localhost) [[BR]]
     60-d domain name inserted in resource description (default: example.com) [[BR]]
     61-w WSAN island name inserted in resource description (default: Example) [[BR]]
     62-f folder where the gateway binary can be found (default: ./) [[BR]]
     63-c gateway binary filename (default: sensei-gateway) [[BR]]
     64-cert ssl certificate filename, also enables https operation [[BR]]
     65-pass ssl certificate passphrase, necessary if the certificate file is encrypted [[BR]]
     66
     67The SENSEI Gateway Watchdog server runs by default on port 9000. It exposes the following urls:
     68 * /start - a POST request starts the gateway if not already started
     69 * /stop - a POST request stops the gateway
     70 * /update - a POST request with a form that has a 'file' field named 'code' updates the gateway binary, a 'text' field named 'version' can also be sent as the version string for the newly uploaded binary, otherwise version string will be taken from the uploaded file
     71 * /uptime - a GET request returns the uptime of the gateway in seconds or -1 if the gateway is not started
     72 * /version - a GET request returns the gateway version string, if one is available.
     73
     74For the /start, /stop and /uptime urls GET requests are also accepted. They return an HTML page that allows easy access to the operations from a browser.