Go to All Forums

Web Socket monitoring

Hello,

Is it possible to set up Web Socket monitoring ?

Typically on my website, a client connectes to the Websocket endpoint, does the handshake, receive a 101 change protocol response, and sends a first command to subscribe + is expected to receive pings at regular intervals.

Is this type of monitoring supported by site24x7 ? Or do you suggest giving a shot at www.websocketmonitor.com ?

If possible I'd like to keep everything under my site24x7 panel

I tried searching a bit for web socket or websocket but your search engine returned nothing... I'm a bit surprised actually.

 

Like (6) Reply
Replies (12)

Re: Web Socket monitoring

Hello,

    We have WebSocket monitoring on our roadmap and will keep you informed of any developments. If you have any specific requirements within a WebSocket such as checking format etc. please let us know.

Regards,

Kurian

Like (0) Reply

Re: Web Socket monitoring

Hello cyril,

    We have released our WebSocket monitor (https://www.site24x7.com/help/admin/adding-a-monitor/websocket-monitoring.html). Please try it out and contact us if you need assistance.

Regards,

Kurian

Like (1) Reply

Re: Re: Web Socket monitoring

Hello,

I just tried to setup a WebSocket monitor on my production website, but after clicking save, I got a popup "Configuration error" without any details, and my monitor is not collecting any data.

The url is www.site24x7.com/app/client#/home/monitors/227694000000452004/Summary

Is there something wrong with my configuration ?

Best,

Cyril

Like (0) Reply

Re: Re: Re: Web Socket monitoring

Hello,

    Let us look into your monitor configuration and get back to you.

Regards,

Kurian

Like (0) Reply

Re: Re: Re: Web Socket monitoring

Hello,

    It looks like the WebSocket end point you've configured is terminating all connections abruptly. We are not able to connect to it even with different tools and locations.

    Please raise a ticket with support if you need further assistance with this monitor.

Regards,

Kurian

Like (0) Reply

Re: Re: Re: Re: Web Socket monitoring

Hello,
The endpoint works perfectly well from my website, for instance the page www.myjobglasses.com/professionals/5a7479fc24c4282c7419061d automatically starts a websocket connection to wss://www.myjobglasses.com/cable and after a 101 changing protocol I see pings coming in the chrome network tab when highlighting the request.

I will open a support ticket.

Best,

Cyril

Like (0) Reply

Re: Re: Re: Re: Re: Web Socket monitoring

Hello,

    It's possible that context from the web page (cookies, headers) is required to establish the WebSocket connection, which would be present when a browser is on the web page but not when making a standalone connection.

Regards,

Kurian

Like (0) Reply

Re: Re: Re: Re: Re: Web Socket monitoring

Hello,

It looks like there is an internal server error in WebSocket connection in the page (www.myjobglasses.com/professionals/5a7479fc24c4282c7419061d) for the URL wss://www.myjobglasses.com/cable.

Regards,

Nandakumar

Like (0) Reply

Re: Re: Web Socket monitoring

Hello,

Going further with this topic - I am using transnational API monitor (great stuff, thank you!). In this monitor I would like to use wss subscription with authentication.

Scenario: a user logs-in in person area, gets JWT token, by token he authenticates to wss: feed and subscribes to the websocket stream.

JWT token retrieval step is currently monitored, but wss monitor is currently available only without authentication.

Would you please include into the roadmap this functionality?

Thanks, Eugene

Like (1) Reply

Re: Re: Re: Web Socket monitoring

It is nice to add authentication for WebSockets, will check the possibilities and try implementing it and then get back to you asap.

Like (0) Reply

Re: Re: Re: Re: Re: Re: Web Socket monitoring

Hello, I'm getting back to you after some (long) time. The websocket is running fine from a chrome or safari web browser (see examples below). There is a protocol negociation and a connection upgrade to use a different protocol, maybe this is what you do not support ? The application I'm using seems to be based on this websocket library github.com/faye/websocket-driver-ruby if this may help

For the examples, I'm using www.myjobglasses.com/professionals/5c361643a51e4155bccf8fdd which is working on my chrome/safari at the moment of writing, but when clicking any card at www.myjobglasses.com/search you should be able to reproduce

In Chrome

    1. Request URL:
      wss://www.myjobglasses.com/cable
    2. Request Method:
      GET
    3. Status Code:
      101 Switching Protocols
  1. Response Headers
    1. Connection:
      upgrade
    2. Date:
      Thu, 23 Apr 2020 14:00:26 GMT
    3. Sec-WebSocket-Accept:
      q+XXXXXXX/b90vlP6zHLaGWSpgU=
    4. Sec-WebSocket-Protocol:
      actioncable-v1-json
    5. Server:
      nginx/1.17.3 + Phusion Passenger 6.0.3
    6. Status:
      101 Switching Protocols
    7. Upgrade:
      websocket
    8. X-Powered-By:
      Phusion Passenger 6.0.3
  2. Request Headers
    1. Accept-Encoding:
      gzip, deflate, br
    2. Accept-Language:
      en-GB,en-US;q=0.9,en;q=0.8
    3. Cache-Control:
      no-cache
    4. Connection:
      Upgrade
    5. Host:
      www.myjobglasses.com
    6. Origin:
      www.myjobglasses.com
    7. Pragma:
      no-cache
    8. Sec-WebSocket-Extensions:
      permessage-deflate; client_max_window_bits
    9. Sec-WebSocket-Key:
      5XXXXXXXXXXXX/g==
    10. Sec-WebSocket-Protocol:
      actioncable-v1-json, actioncable-unsupported
    11. Sec-WebSocket-Version:
      13
    12. Upgrade:
      websocket
    13. User-Agent:
      Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36

 

In Safari

Summary
URL: wss://www.myjobglasses.com/cable
Status: 101 Switching Protocols
Source: —

Request
Connection: Upgrade
Host: www.myjobglasses.com
Origin: www.myjobglasses.com
Sec-WebSocket-Protocol: actioncable-v1-json, actioncable-unsupported
Pragma: no-cache
Cache-Control: no-cache
Sec-WebSocket-Key: XXXdlm2HY9ZMuvncT5jTw==
Sec-WebSocket-Version: 13
Sec-WebSocket-Extensions: x-webkit-deflate-frame
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15

Response
Date: Thu, 23 Apr 2020 14:01:27 GMT
Connection: upgrade
Set-Cookie: AWSALB=fU2F+XXXXXXX; Expires=Thu, 30 Apr 2020 14:01:27 GMT; Path=/
Set-Cookie: AWSALBCORS=fU2F+XXXXXX; Expires=Thu, 30 Apr 2020 14:01:27 GMT; Path=/; SameSite=None; Secure
Sec-WebSocket-Protocol: actioncable-v1-json
Upgrade: websocket
Sec-WebSocket-Accept: XXXXXXhgaJibfnDyzg3dtBXYSZg=
Status: 101 Switching Protocols
X-Powered-By: Phusion Passenger 6.0.3
Server: nginx/1.17.3 + Phusion Passenger 6.0.3

Like (0) Reply

Re: Re: Re: Re: Re: Re: Re: Web Socket monitoring

Hello,

The context used from the web page(cookies) to establish the WebSocket connection is refreshing each time. These are present in browser while accessing the web page but not when making standalone connection, which makes the connection fail.

Regards,

Nandakumar

Like (0) Reply

Was this post helpful?