WebSocket

WebSocket module uses websocket to send data from an instance to a collector.

Configuration

Agent/Client

You need sirona-websocket-client dependency and to add the following configuration in your sirona.properties:

org.apache.sirona.store.DataStoreFactory = org.apache.sirona.websocket.client.WebSocketDataStoreFactory
org.apache.sirona.websocket.client.WebSocketClientBuilder.marker = test
org.apache.sirona.websocket.client.WebSocketClientBuilder.uri = ws://localhost:1235/test-websocket/
# optional
org.apache.sirona.websocket.client.WebSocketClientBuilder.retries = 2
org.apache.sirona.websocket.client.WebSocketClientBuilder.authorization = BASIC xxxxx

If you want to specify websocket for a subset of data store use the following classes:

  • org.apache.sirona.websocket.client.WebSocketCounterDataStore for counters
  • org.apache.sirona.websocket.client.WebSocketGaugeDataStore for gauges
  • org.apache.sirona.websocket.client.WebSocketNodeStatusDataStore for validation/status

Server

You need to add sirona-websocket-server dependency and configure the collector in websocket mode (no need of HTTP collector if you don’t use it):

org.apache.sirona.store.status.NodeStatusDataStore = org.apache.sirona.store.status.InMemoryCollectorNodeStatusDataStore
org.apache.sirona.store.counter.CollectorCounterStore = org.apache.sirona.store.memory.counter.InMemoryCollectorCounterStore
org.apache.sirona.store.gauge.CollectorGaugeDataStore = org.apache.sirona.store.gauge.DelegatedCollectorGaugeDataStore
# not yet implemented with websockets so if you use it use http push for path tracking or another one
org.apache.sirona.store.tracking.PathTrackingDataStore = org.apache.sirona.store.memory.tracking.InMemoryPathTrackingDataStore

Send Period

You can also configure the period used to flush periodicly data:

  • org.apache.sirona.websocket.period: which period to use to push counters data to the server (default to 1mn).

Limitations (ATM)

You cannot yet use WebSocket for path tracking.