You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sirona.apache.org by rm...@apache.org on 2015/11/01 07:31:24 UTC
svn commit: r1711717 - in /incubator/sirona/site-content/trunk/src/site:
markdown/websocket.md site.xml
Author: rmannibucau
Date: Sun Nov 1 06:31:24 2015
New Revision: 1711717
URL: http://svn.apache.org/viewvc?rev=1711717&view=rev
Log:
adding websocket doc
Added:
incubator/sirona/site-content/trunk/src/site/markdown/websocket.md
- copied, changed from r1711716, incubator/sirona/site-content/trunk/src/site/markdown/cube.md
Modified:
incubator/sirona/site-content/trunk/src/site/site.xml
Copied: incubator/sirona/site-content/trunk/src/site/markdown/websocket.md (from r1711716, incubator/sirona/site-content/trunk/src/site/markdown/cube.md)
URL: http://svn.apache.org/viewvc/incubator/sirona/site-content/trunk/src/site/markdown/websocket.md?p2=incubator/sirona/site-content/trunk/src/site/markdown/websocket.md&p1=incubator/sirona/site-content/trunk/src/site/markdown/cube.md&r1=1711716&r2=1711717&rev=1711717&view=diff
==============================================================================
--- incubator/sirona/site-content/trunk/src/site/markdown/cube.md (original)
+++ incubator/sirona/site-content/trunk/src/site/markdown/websocket.md Sun Nov 1 06:31:24 2015
@@ -16,42 +16,48 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-# Cube
+# WebSocket
-Cube module allows to push counters and gauges to a Square Cube instance (see [Cube github wiki](https://github.com/square/cube/wiki)).
+WebSocket module uses websocket to send data from an instance to a collector.
## Configuration
-org.apache.sirona.store.DataStore = org.apache.sirona.cube.CubeDataStore
-org.apache.sirona.cube.period = 100
-org.apache.sirona.cube.CubeBuilder.collector = http://localhost:1234/collector/1.0/event/put
-* `org.apache.sirona.cube.CubeBuilder.collector`: the cube event collector address (`http://xxx:1234/collector/1.0/event/put` for instance)
-* `org.apache.sirona.cube.CubeBuilder.proxyHost`: optionally a proxy host
-* `org.apache.sirona.cube.CubeBuilder.proxyPort`: optionally a proxy port
+### Agent/Client
-For instance your `sirona.properties` can look like:
+You need `sirona-websocket-client` dependency and to add the following configuration
+in your `sirona.properties`:
-<pre class="prettyprint linenums"><![CDATA[
-org.apache.sirona.cube.CubeBuilder.collector = http://localhost:1234/collector/1.0/event/put
-]]></pre>
-
-## DataStore
-
-To push metrics (Gauges + Counters) to Cube you can use the dedicated `DataStore`: `org.apache.sirona.cube.CubeDataStore`.
-
-Simply add to `sirona.properties` the line:
-
-<pre class="prettyprint linenums"><![CDATA[
-org.apache.sirona.store.DataStore = org.apache.sirona.cube.CubeDataStore
-]]></pre>
+ 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
### Counters
You can also configure the period used to flush counters values:
-* `org.apache.sirona.cube.period`: which period to use to push counters data to Cube (default to 1mn).
+* `org.apache.sirona.websocket.period`: which period to use to push counters data to the server (default to 1mn).
## Limitations (ATM)
-When using CubeDataStore you cannot retrieve locally gauges values (you are expected to use Cube for it).
+You cannot yet use WebSocket for path tracking.
Modified: incubator/sirona/site-content/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/sirona/site-content/trunk/src/site/site.xml?rev=1711717&r1=1711716&r2=1711717&view=diff
==============================================================================
--- incubator/sirona/site-content/trunk/src/site/site.xml (original)
+++ incubator/sirona/site-content/trunk/src/site/site.xml Sun Nov 1 06:31:24 2015
@@ -86,6 +86,7 @@
<item name="Cube" href="/cube.html"/>
<item name="Collector" href="/collector.html"/>
<item name="Cassandra" href="/cassandra.html"/>
+ <item name="WebSocket" href="/websocket.html"/>
<item name="Download" href="/download.cgi"/>
</menu>