Skip to end of banner
Go to start of banner

opEvents Realtime Events

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

In opEvents 3.3.0, we have introduced realtime events to push updates as they happen to the GUI.

Currently this is an opt-in feature and requires setting opevents_realtime_gui to true.

When a new event is created, either after parsing or via create event the event details are pushed onto a queue.

Updates to the event as it passes through the EventAction pipeline and the key or keys "priority" "acknowledged" "action_checked" "notes" "status" changes, these updates will be pushed into the queue.

Currently Supported Screens

Current Events

Events

Checking Redis Status

Under Help → Redis Info you will find debug information about the configured Redis Instance

Redis Issues

For any reason the opEvents log or the Redis status is showing an error please see our page on debugging Redis Redis and Opmantek Applications


Apache Config Changes

HTTPS Realtime Events

If you are using opEvents with https there are a few changes needed to proxy websockets to the opEvents web-server.

You will need to enable proxy_wstunnel and modify the OMK provided Apache virtual host.

The minimum Apache version required is 2.4.5

Debian

If you are running a debian based linux os please enable these apache modules

a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel

CentOS & Redhat 7

Edit /etc/httpd/conf.modules.d/00-proxy.conf

All modules related to proxying websockets are listed in this configuration file, please uncomment:


LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel modules/mod_proxy_wstunnel.so


Then restart Apache

sudo systemctl restart httpd


Proxy the webscocket

Locate the Opmantek Apach2 virtual host in /etc/apache2/conf-enabled/04omk-proxy.conf

We need to tell the omk server application the connection is being proxied and the client has connected over https, Find  RequestHeader and change from http to https

RequestHeader set X-Forwarded-Proto "https"

Above <Location "/omk"> add the following line, if you are using other languages please change "en" to your specified language.

ProxyPass "/en/omk/opEvents/ws/events" ws://localhost:8042/en/omk/opEvents/ws/events

Proxy the websocket for Redhat 7

This has been tested with Apache 2.4.6

Instead of ProxyPass you will need to use ProxyPassMatch

ProxyPassMatch ^/(en/omk/opEvents/ws/events)$  ws://localhost:8042/$1

A basic example with config to use serve opEvents over SSL and proxy the Webscockets

<VirtualHost *:443>
        ServerName example.opmantek.com

        SSLEngine on
        SSLProxyEngine On
        ProxyRequests Off

        SSLCertificateFile    /etc/ssl/certs/example/cert.pem
        SSLCertificateKeyFile /etc/ssl/certs/example/privkey.pem
        SSLCertificateChainFile /etc/ssl/certs/example/fullchain.pem

        RequestHeader set X-Forwarded-Proto "https"

		# Proxy the websocket connection
        ProxyPassMatch ^/(en/omk/opEvents/ws/events)$  ws://localhost:8042/$1
		# Proxy the rest of the application
        ProxyPass / http://localhost:8042/
        ProxyPassReverse / http://localhost:8042/

</VirtualHost>

Debugging Web Socket connections

If you see this error it means the browser cannot connect to the webserver, at this current point you will need to use the Browsers developments tools to access the Javascript Console

Uncaught DomException: The operation is insecure

You are serving opEvents over ssl but the websocket is trying to to connect over http, this is disallowed from happening because of browser security policies.


You will need to find your Apache Config and make sure this header is being sent to the omkd web server

RequestHeader set X-Forwarded-Proto "https"

Get /en/omk/opEvents/ws/events 404 Not Found

The websocket is trying to connect securely but its not being proxied correctly, please see the above section Proxy the webscocket

Check Apache has proxy_wstunnel_module loaded

httpd  -t -D DUMP_MODULES | grep proxy_wstunnel_module

Current Issues

Event partial updates over websockets eg {id:abc, acknowledged:1} have no group check, meaning if you have a user with only group access of "DataCenter" their browsers websocket would receive partial updates from events their group permission would not allow access to. As the users browsers doesn't have the original event the partial update will not be shown to the user. This is planned to be fixed in the next release.

Node Context Links are not rendered with realtime events, This is planned to be fixed in the next release.





  • No labels