CaSchd.rb

stable versions

=> 20100124 release (and after) needs the following rubygem package : net-ping-1.3.2.gem (see http://rubyforge.org/frs/?group_id=126).


=> 20100727 is available as a Windows binary (One-Click Ruby Application) if you don’t want to install ruby, gems,... Just unzip and enjoy.


- 20100727
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. Avoid running CaSchd.rb while building One-Click Ruby Application package (see http://rubyforge.org/projects/ocra).


- 20100711
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. CaJson rebuild in a less didactic but much more efficient way


- 20100213
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. Add 'link' action to reuse an existing result (see caschd.conf for sample)


- 20100124
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. Add the action 'icmp' (ping test) to CaTest.rb


- 20091211
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. Close and reopen csv files after writing headers (need by the red threads mode)


- 20090919
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. A lot of minor changes to remove all RubyMine warnings


- 20090910
- External Windows Console (20090818)

- Windows Heartbeat (20090911)

  1. The test 'htbt has been reintroduced (accidentally removed).

  2. Sending alert messages includes a new mode "FF" (in addition to "PpLl"). It allows to send by mail the contents of a defined text file (generic or specific to each state's test). The association is made at the declaration of the user ("user"). For the test named "X", the files are called "_X.OK" (return to normal), "_X.KO" (error) and "_X" (generic). The other characters than alphabetic or numeric are replaced by a underscore character ("_"), ex: "test" requires "__Test.OK", "__Test.KO" and / or "__Test.

  3. The CSV file format has been revised: column name in quotation marks, date format "YYYY / MM / DD" and time format "HH: MM".

  4. The utility CaSchd_Htbt.exe generates a heartbeat from Windows (in batch, in the Tasks Scheduler, ...).

- 20090904
- External Windows Console (20090818)

  1. The labels of status information have been modified from OK/HS to OK/KO (Internationalization).

  2. The. Csv files are now generated in "htdocs".

  3. The double quote ("") can be used to enter a quote in a string (in caschd.conf).

  4. The actions now have an "info" area that can be displayed on the pages instead of the automatically generated text (if completed). The indication "info" is html: it can change the attributes of displayed text ( "<b>bold</ b>"), insert a link to click ( "<a href ="" http:/ /...""> label </ a>)... IMPORTANT: use a double quotes ("") to enclose the URL (see example above).

  5. The test "cnsl" can query a second server CaSchd (on the principle of the external windows console). The format of "args" is as follows: [<timeout>, <url_without_http://>, < consulted tests or "" for all>, "reporting level 1: OK? or 2: KO!>]

    Sample : [10,
        '192.168.0.2:2000',
        'Monde#Test#France', 1].

- 20090828
- External Windows Console (20090818)

  1. Add the "red thread" mode (process managed by the OS). The choice between "green threads" and "red thread" takes place in the file" caschd.conf. When the key "drby" (in "conf") is associated with a port, "red thread" is active. The addition of the character "#" before "dbry" can switch to "green threads". Web pages generated specifies the current mode.

- 20090823
- External Windows Console (20090818)

  1. Add "fpfp" action. It works on the same principle that "sppp " for testing FTP. The " args" format is as follows: [<timeout>, "<ftp server (get)>", "<login>", "<password>", "<path to remote file to download>", "<local file to compare>","<ftp server (put)", "<login>","<password>", "<path to remote file to upload> "," <local file to send>"]. When "local file to compare" or "local file to send" are not specified, they take "caschd.flg" for value. <path to remote file to download> is deleted after downloading.


- 20090816
- External Windows Console (màj. 20090818)

  1. Add "/?cnsl=* " and "/?cnsl=?" requests to list the tests and their respective states => required by the utility "external mixer.

  2. Responses to requests "/?htbt =... " is now in text/plain  (and not text/html) => adapt your scripts!

  3. Add a utility ("external console" in PureBasic) which displays a trayicon (Windows) which indicate the tests state: red new alert (with bell), purple after acknowledge (double click to open the CaSchd Web page), green after return to normal of all abnormal tests.

- 20090813

  1. Optimization for windows:
        Socket.do_not_reverse_lookup = true

- 20090729

  1. Add a DNS resolution action, sample :
        {   "name" : "rdns",
            "args" : [ 5,
            "212.27.40.240",
            "wdwave.dnsalias.com",
            "88.185.48.186 88.185.48.187 88.185.48.188" ],                                   
            "redo" :  0 }.

    Required parameters are:
        - response timeout (5)
        - DNS address (212.27.40.240)
        - Host to find (wdwave.dnsalias.com)
        - Possible answers separated by a space (88...)


- 20090724

  1. Conserve the duration of each action a test in a csv file. The value -1 corresponds to an failed action.


- 20090718

  1. Actions related to the broadcast of alerts are placed on hold for 2 min. They were canceled after a new change of state during this period. This mechanism avoids sending warning and an indication of return to normal the next minute. State changes are all recorded in the log.

  2. To avoid the use of this mechanism (and broadcast immediately the alert), add an exclamation mark (“!”) before the name of the test, eg "Test" (wait 2min. before release or cancellation), "!Test” (immediate send).


- 20090711

  1. Add the action "sppp" to check the sending and receiving of a message (using SMTP/POP3)

  2. Add the POP3 access control action

  3. Add the action "htbt" to check regular soliciting of URLs to monitor the status of remote applications ( "heart beat")

  4. Add the "info" method (in CaTest.rb) which returns the information related to actions to display (in web pages and log) => hides the critical parameters (mail address, password, ...)


- 20090704

  1. The management of the testing period by thread has been reviewing (quicker if successful)

  2. The duration of the last test and the maximum is given after each action as <action> (current<max.)

  3. The management of threads activity in the pool ("*", "_") has been consolidated by using a specific method (setPageChr) and the use of a thread index (see method exec: mid)


- 20090621

  1. The TCP ping was changed to be in default if the connection is refused (in the standard only the lack of response is a mistake) => allows to assimilate a refused connection of firewalls to a fault

  2. In "user", the fourth parameter of the action "smtp" accepts the following values "", "P", "L" and "PL" corresponding to sending only the title of the page , the page, the log and page with the log associated to the event: anomaly detection (in uppercase "P", "L") or return to normal (in lowercase "p", "l")


- 20090611

  1. The log ("*") is limited to state changes and alerts sending (initially everything was recorded to monitor the behavior of the scheduler)

  2. Add the action "puts" (to record a change of a test in the log without sending message)


- 20090608

  1. Following a restart, the last 100 events are reloaded from the log file

  2. Manage alerts sending (5 attempts 5s spaced)

  3. Immediate repeat of failed action to confirm the default (defore decrementing "redo"); 5s pause between attempts


- 20090607

  1. If a test should not be launched, do not control his actions if already done (in the scheduler, iteration management events)


- 20090605

  1. Indication of the version 

  2. 40 simultaneous actions

  3. Alpha order to display the tests

  4. Optional "redo" (default 0)

  5. Optional “atom” (default to true)

  6. "Atom" (= true) limits the use of an action to its scheduled time (in normal use or after a default). It is not executed after the recovery actions of a failed test if failed on another action. This option avoids verifying all the actions of a test for the lack of one. When "atom" is false, the associated action is always checked.


- 20090529

  1. Indication of state of the threads pool

  2. Check cajson.conf syntax

 

- 20090523

  1. Accumulated corrections and changes since 20090412

 

CAUTION:

- Source licensed under GPL v3

- Documentation licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 France

 

applications and documentations

Documentations

- QuickStart US [PDF 298Ko] [r. 20100124]

- QuickStart [PDF 348Ko] [french, r. 20090904]

- CaSchd.rb [soon]

- CaTest.rb [soon]

- CaJson.rb [soon]

- CaJson-old.rb [PDF 88Ko] [french]


Evolutions
- Planned and validated

  1. Adding &test: the test is abnormal only if all its actions failed. (1)

  2. Add a validation to inhibit failed actions until they return to normal. This allows to reactivate the test and check if another action fails => as a URL with password like "htbt" (attached to e-mail alerts)

  3. Add value and sending control associates on the principle of the test "htbt", ex. : an agent sends regularly the remaining disk space, etc..

  4. Check the area of visibility of variables and increase the use of Self

  5. Monitor the use of "each" to restrict the usages

  6. Document CaTest.rb and CaSchd.rb


- Validation pending    

  1. Add external actions (.rb, .sh)

  2. Add an upload/download of the configuration

  3. Integrate the control part of the configuration file to the CaSchd class

  4. Manage a delayed sending of in addition to the 5 attempts (c.f. versions 20090608)


- Disapproved

  1. Embellish the interface with images and themes: CaSchd.rb is a platform for testing; Part consultation should be as light as possible.

  2. Add a JSON editor to configure via web (one day...)


(1) authorizes the implementation of a tests tree (and  diagnosis)