Currently WSO2 Data Analytic Server set the current timestamp to every event received using the available APIs. Is there a way to pass the timestamp value on the event data over the APIs in order to sent historical events to DAS?
From DAS 3.1.0 RC 1 onwards this can be achieved. You can follow the steps below to try it out.
Download DAS 3.1.0 RC1 from here.
Create an event stream with your payload and also add an attribute named _timestamp and set the attribute type as long.
Persist the Event selecting your payload attributes. (Please note that you will not be able to select the _timestamp attribute so leave it as it is)
Now simulate a event by providing your payload data along with the _timestamp epoch e.g - 1450206041000. The data explorer will show you an event received in 2015-12-16 00:30:41
Related
Is there any document or step by step process which guides us on how we can use WS02 DAS to pull data from java class objects and display reports using this data using WS02 Dashboards.
Any help would be really appreciated.
First You can create an Event Stream by specifying attributes and mention what are the attributes you need to persist. When events arrives to the streams, those will be stored in Events tables [1].
Then you can create an Event Receiver for that Event Stream [2]. When creating an event stream you can use a protocol such as Thrift, Soap, Http, Mqtt, JMS, Kafka and Web sockets. You can write a simple Java Application to publish data to DAS Receiver you created on message format protocol which you have selected. For an instance if you create SOAP receiver you can use data on soap message format and also if you create a HTTP receiver you can use JSON format.
You can create a dashboard and gadgets to visualize Event table which was created by your persistent stream [3]. Please note that this event table consist all the events WSO2 DAS received, you can process these data by using spark SQL [4] and create several streams which could be used in Analytics Dashboard.
[1]https://docs.wso2.com/display/DAS300/Understanding+Event+Streams+and+Event+Tables
[2] https://docs.wso2.com/display/DAS300/Configuring+Event+Receivers
[3] https://docs.wso2.com/display/DAS300/Analytics+Dashboard
[4] https://docs.wso2.com/display/DAS300/Batch+Analytics+Using+Spark+SQL
Your subject of the question and the body is contradictory. The subject says to push data while the body says pull data.
If push data is what you want to achieve, you can refer https://docs.wso2.com/pages/viewpage.action?pageId=45952633 This uses a thrift client to push data to DAS.
Please refer https://docs.wso2.com/display/DAS300/Analyzing+Data for how to analyze the raw data. You can write spark scripts for analyzing.
Finally you can https://docs.wso2.com/display/DAS300/Communicating+Results on how to analyze data. You may use the REST API exposed with DAS 3.0.0 to pull data from DAS.
I have a outer service which will insert data to redis(I can get the keys of the data),but this may take some times , so the question is, how can I get to know that the data is comming.I want to show that in a page based django??
Use PUB/SUB of redis.
When your other service inserts new data, publish key on some channel...
So your django subscribes on channel "datachanged"
./redis-cli subscribe "datachanged"
And your service send event over channel
./redis-cli set "key:abc123" "some value"
./redis-cli publish "datachanged" "key:abc123"
Also you can use "Redis Keyspace Notifications" if your redis is newer then 2.8.0 (http://redis.io/topics/notifications)
I am new to WSO2 CEP
I have created the entire flow to read the JMS message and split it using Text formatter. The problem is that when I try to push messages into the queue, it is not able to reach the the output event adaptor. I have a mysql event adaptor and configured it into my event formatter but I keep getting the below message in my log
[2014-02-13 21:20:06,347] ERROR - {ReceiverGroup} No receiver is reachable at reconnection, can't publish the events
[2014-02-13 21:20:06,352] ERROR - {AsyncDataPublisher} Reconnection failed for for tcp://localhost:7661
Can someone help me understand what is this tcp://localhost:7661 is all about
Regards
Subbu
tcp://localhost:7661 is the default port to which Thrift(WSO2 events are published). It seems a default event formatter has been created and trying to publish events to that port.
Can you check your list of event formatters and ensure that no event formatters of type WSO2Event are created. This event formatter might be automatically created if you set an exported stream to be 'pass-through' when creating the execution plan.
You can enable event tracing[1] and monitor to determine exactly upto which point the event is coming in your configured flow.
[1] http://docs.wso2.org/display/CEP300/CEP+Event+Tracer
HTH,
Lasantha
I am working with wso2cep3.0. I went through the docs of wso2cep but there is no exaplanation about wso2cep how would i use it
1.what is the use of Input Event Adapter:-in my concern for getting the data from client.
2.Event Builder means incoming data format specifier.
3.Event Formatter means Outgoing data format specifier.
4.Output Event Adapter out put handler.
but how can i use this thing means any program or any event writer most important how would i publish this to external world example as http endpoint or https or jms.
I am unable to understand how would i start and where can i start.
Please suggest me i know the ESB,DSS,IS,BPS
For a typical CEP usecase, you configure the input event adaptor to connect to an event source, such as a JMS endpoint, Thrift endpoint(WSO2Event adaptor in CEP 3.0.0) etc. Event builder specifies how the incoming message will be mapped.
Next the execution plans will have the actual query (the processing part) of the execution flow. This is where the CEP engine actually processes the events.
Event formatter formats it to an output format as needed. The output event adaptor connects to the actual endpoint to which the processed result would be published. It would go and publish to a JMS endpoint, email, database etc.
To get started, you need to create an input event adaptor, then an event builder that uses the input event adaptor, then the execution plan, then the output event adaptor, and an event formatter that would format the result from the execution plan and send to the relevant output adaptor. You can find the flow in [1].
You can find example configurations in /samples/artifacts directory. You can find an overview of samples in [2] and can find how to run them [3]. Each sample has an associated producer and a consumer that simulates real world event producers/consumers. Samples would be the best place to learn more about CEP configurations.
[1] http://docs.wso2.org/display/CEP300/CEP+Configuration+Overview
[2] http://docs.wso2.org/display/CEP300/Overview+of+Samples
[3] http://docs.wso2.org/display/CEP300/Setting+up+CEP+Samples
I am developing a touch screen device that gets data from field devices using the BACnet protocol.
I'm currently developing some pages that show devices alarms. As per BACnet documentation, there is a service named AlarmSummary. When invoke (as a client) this service, field device answers with a list that include, for each alarm, the following information
object identifier
alarm state
list of acked transitions
Now my question is: how can I acknowledge an alarm that I read through the GetAlarmSummary service considering that the AckAlarm service requires the following information to be provided
Event Object Identifier
Event State
Acknowledged Time Stamp
Acknowledgment Source
Time Of Acknowledgment
Thanks in advance
In short, you can't or you read the required information in a second step. Use the GetEventInformation service to obtain information about active event states. It returns all information required to acknowledge alarms.
Note, that the execution of GetAlarmSummary and GetEnrollmentSummary is deprecated, see future Addendum 135-2012av. Regardless, initiation will be still required if a device doesn't support AE-INFO-B.