monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Websockets monitoring


From: Mehul Ved
Subject: RE: Websockets monitoring
Date: Wed, 5 Mar 2014 08:32:08 +0000

Hi Martin,
  I tried using the new version of monit but it fails on `monit validate` for 
websockets

$ which monit
/usr/local/bin/monit

$ monit --version
This is Monit version 5.8
Copyright (C) 2001-2014 Tildeslash Ltd. All Rights Reserved.

The lines I've added:

 if failed host dev.deltamktgresearch.com port 10301 protocol websocket
    host "dev.deltamktgresearch.com"
    request "/"
    origin "http://www.websocket.org";
    version 13
    then alert

$ monit validate --verbose
'wsserver' zombie check succeeded [status_flag=0000]
'wsserver' succeeded connecting to INET[dev.deltamktgresearch.com:10301/] via 
TCP
'wsserver' failed protocol test [WEBSOCKET] at 
INET[dev.deltamktgresearch.com:10301/] via TCP -- WEBSOCKET: pong error -- 
opcode 0x1


Using location ws://dev.deltamktgresearch.com:10301 in location box on 
http://websocket.org works perfectly. It responds with "who" which is correct. 
Is there a way to set send/expect to check for the correct response?
________________________________________
From: address@hidden <address@hidden> on behalf of Martin Pala <address@hidden>
Sent: Monday, March 03, 2014 2:29 PM
To: This is the general mailing list for monit
Subject: Re: Websockets monitoring

Hi,

we have implemented the websocket protocol test, example usage:

check host websocket.org with address "echo.websocket.org"
    if failed port 80 protocol websocket
      host "echo.websocket.org"
      request "/"
      origin "http://www.websocket.com";
      version 13
    then alert

The test connects to websocket, performs ping/pong test and closes the 
connection.

If you want to test it, you can get the development Monit version here: 
https://bitbucket.org/tildeslash/monit/get/master.tar.gz

Compilation:

        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"

Regards,
Martin


On 24 Feb 2014, at 07:23, Mehul Ved <address@hidden> wrote:

> Hi,
>   I have a node.js service that works as a websocket server. I am working on 
> monitoring it using monit. I haven't been able to find any information about 
> using websockets with monit either in the group archives or using google 
> search. Has anybody worked on this before?
>   Is it possible to monitor websockets in monit currently without adding in a 
> websocket client script in between? I can definitely do that but wanted to 
> check if there's a better way to do it without any additional component.
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



reply via email to

[Prev in Thread] Current Thread [Next in Thread]