http status codes

Issue #4 resolved
hryamzik created an issue

It would be great to have an ability to define "good" and "bad" status codes for http checks. For now I have to monitor page that must return 404. Google says others have similar issues with other non-200 http codes.

Comments (6)

  1. Tildeslash repo owner

    A bit unorthodox, but I see your point and it does make sense to be able to test and declare failure on any HTTP status code returned by the server.

  2. Tildeslash repo owner

    Custom status code test will be part of next release.

    Example usage: Return error if page DOES exist (for success 404 is expected):

    if failed
        port 80
        protocol http
        request "/non/existent.php"
        status = 404
    then alert

    If you want to test it, you can get the development version here:


    tar -xzf master.tar.gz
    cd tildeslash-monit-*
    ./bootstrap && ./configure && make

    The monit binary will be in current directory, you can install it to "/usr/local/bin" using "make install".

  3. Log in to comment