Menu

Tree [1ff74b] master /
 History

HTTPS access


File Date Author Commit
 config 2012-11-07 Jason Jason [138575] add log to configure module
 src 2012-11-08 Jason Jason [1ff74b] add lib path to fit for libevent2 in freebsd
 AUTHORS 2012-05-18 Jason Jason [a61f34] merge the xml configuration function
 COPYING 2010-12-12 Paul Yang Paul Yang [bce9ec] add a GNU style compiling system and some empty...
 ChangeLog 2012-06-05 Paul Yang Paul Yang [be1dd3] release: version 0.2.0
 FAQ 2010-12-12 Paul Yang Paul Yang [bce9ec] add a GNU style compiling system and some empty...
 INSTALL 2010-12-14 Paul Yang Paul Yang [e95e44] update the file "INSTALL"
 LICENSES 2011-01-28 Paul Yang Paul Yang [728e0e] update some text files and fix some bugs
 Makefile.am 2012-06-11 Jason Jason [b60b98] fixed bug in use 'make dist'
 NEWS 2010-12-12 Paul Yang Paul Yang [bce9ec] add a GNU style compiling system and some empty...
 README 2012-11-07 Jason Jason [88f599] change README
 TODO 2012-07-05 Paul Yang Paul Yang [ba06d0] update TODO list
 config_layout.h.in 2012-05-19 jason jason [4aaaae] change the default director for krake.conf
 configure.in 2012-11-08 Jason Jason [1ff74b] add lib path to fit for libevent2 in freebsd

Read Me

=Overview=
Krake is a health monitor which can check the server's health status.

By now, krake has supported the following checkers, each checker can perform
a specific network protocol:
*) icmp
*) tcp
*) http/https

Krake runs as a daemon and can be configured by a xml styled configuration file.
Krake can run in most Unix like environment, incl. Linux and xBSD.


=Installation=
Read the INSTALL file in the source code tree.


=General Usage=
The krake daemon supports the following options:

        --config/-c             Assign the configruation file
        --reload/-r             Reload the configruation file
        --show/-s               Show health status, -s all for all monitor, -s monitor_name for one monitor
        --quit/-q               Shutdown krake
        --version/-v            Show Krake version
        --help/-h               Show this help


=Configuration=
Default configuration file: $prefix/etc/krake.conf, the $prefix refers to the parameter passed to configure script while 
compile the source code.

Example:

<?xml version="1.0"?>
<krk_config>
    <monitor>                               <!--Keyword for krake configuration, monitor can more than one-->
        <name>monitor1</name>               <!--name of a monitor-->
        <status>enable</status>             <!--Only can be enable or disable; 
                                            when enable, also starts the monitor's timer;
                                            when disable, also stops the monitor's timer-->
        <checker>http</checker>             <!--specify a checker using by a monitor-->
        <checker_param>b</checker_param>    <!--checker's parameters-->
        <interval>5</interval>              <!--interval of monitor's timer in seconds-->
        <timeout>3</timeout>                <!--time out value of checked host in seconds-->
        <failure_threshold>3</failure_threshold>            <!--how many times of failures happen, marking host as down-->
        <success_threshold>3</success_threshold>            <!--how many times of successes happen, marking host as up-->
        <node>
            <host>10.1.1.2</host>               <!--ip address of a checked host, either ipv4 address is valid-->
            <port>8080</port>                   <!--port number of a checked host, range is 1 ~ 65535-->
        </node>
        <node>
            <host>10.1.1.3</host>               <!--ip address of a checked host, either ipv4 address is valid-->
            <port>8080</port>                   <!--port number of a checked host, range is 1 ~ 65535-->
        </node>
        <script>h</script>                  <!--failure notification, if user specify this option,
                                            when a failure of a checked host is deteceted, krake will call this script-->
    </monitor>
    <log>                               <!--set logging attributes-->
        <logtype>syslog</logtype>       <!--set the type of logs that krake sends, value can be file, syslog-->
        <loglevel>2</loglevel>          <!--set the level of logs, under which the logs will not be sent out-->
    </log>
</krk_config>

If don't want to use this file, you can assign another xml file by krake command line

After you make some modifications to the configuration file, you can use "krake -r" to force the daemon reload the 
configuration file without stopping the current detection.


=Configuration of the Checkers=
At current stage, only http checker has the checker parameters.

http checker:
        
        <checker-param>send-file:/path/to/a/file expected-file:/path/to/a/file</checker-param>

    This let you to specify what to send and what to expected to receive when you use the http checker.
    You can write the http packet into a send file and tell Krake what to send.

    If these parameters are missing, then Krake will send a minimum http request packet as:
        GET / HTTP/1.0
        Host: Backend
        Connection: Close

    and expect only the 200 status of the http response.
    http checker now only supports HTTP 1.0 protocol.