[Dev] Email Notification under a proxy server

2016-10-12 Thread Aneela Safdar
Hi,
I am trying to use Email adapter in order to provide notifications. But the 
problem is I am behind a proxy server and JavaMail doesnot support any web 
proxy, After a little search, I have found out that it is doable if proxy 
server supports SOCKS. It means I have to add parameters of Email adapter  in 
outout-event-adapter.xml file to put information of proxy server ip, port, 
username and password etc. Any suggestions or other way out?

 Regards, 
Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error in sending a notification through Email Publisher; Unknown SMTP host: smtp.gmail.com

2016-10-11 Thread Aneela Safdar
Hi,
I am trying to send notification using Email adapter of Event Publisher. This 
is my output-event-adapter.xml's Email configurations
    
    
    safdar.anee...@gmail.com
    Aneela Safdar
    */property>
    smtp.gmail.com
    587
    true
    true
    
    8
    100
    2
    1
     I receive following error upon publishing events.I am 
behind a proxy, is this an issue behind this error or something else?

[2016-10-11 14:57:35,024] ERROR {org.wso2.carbon.event.output.adapter.email.Emai
lEventAdapter} -  Event dropped at Output Adapter 'AlertEmailPublisher' for tena
nt id '-1234', Error in message format, Unknown SMTP host: smtp.gmail.com
javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
  nested exception is:
    java.net.UnknownHostException: smtp.gmail.com
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1280)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:37
0)
    at javax.mail.Service.connect(Service.java:297)
    at javax.mail.Service.connect(Service.java:156)
    at javax.mail.Service.connect(Service.java:105)
    at javax.mail.Transport.send0(Transport.java:168)
    at javax.mail.Transport.send(Transport.java:98)
    at org.wso2.carbon.event.output.adapter.email.EmailEventAdapter$EmailSen
der.run(EmailEventAdapter.java:306)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: smtp.gmail.com
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:178)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
    ... 12 more

Regards, 
Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] View Contents of In-Memory table

2016-08-31 Thread Aneela Safdar
Hi,
I am using in-memory tables in execution plans and there sometimes  I need 
occur to see the contents of these tables. I was wondering if there is any such 
way like RDBMS tables?
 Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Scatter Plot missing values

2016-08-29 Thread Aneela Safdar
Hi,
I have sent this email and didn't get any response yet. I hope you guys are 
working on it. I tried some more data and concluded that scatter plot isn't 
plotting anymore data on y-axis with same x-axis after it has done once. In my 
problem, I am not seeing any multiple ports against same ip address.

Waiting for the suggestions.
Thanks Regards, 
Aneela Safdar

  From: Dakshika Jayathilaka <daksh...@wso2.com>
 To: Aneela Safdar <ansaf_...@yahoo.com>; Tharik Kanaka <tha...@wso2.com> 
Cc: WSO2 Developers' List <dev@wso2.org>
 Sent: Monday, August 29, 2016 7:48 AM
 Subject: Re: [Dev] Scatter Plot missing values
   
Looping Tharik. 


Dakshika JayathilakaPMC Member & Committer of Apache Stratos
Associate Technical LeadWSO2, Inc.
lean.enterprise.middleware0771100911
On Sat, Aug 27, 2016 at 5:02 PM, Aneela Safdar <ansaf_...@yahoo.com> wrote:

Hi,
I am trying scatter plot and there are some values missing in the final output 
I dont know why. I am plotting port_numbers against ip_addresses and the 
problem is its keeping only latest ip_address and port_number pair discarding 
any previous port_number related to that ip.
G1 : source_ip as X-axis, source_port as Y-axis and protocol as color (type - 
ordinal)
G12: destination_ip as X-axis, destination_port as Y-axis and protocol as color 
(type - ordinal)
Below plot is the result of following data
source_ip, source_port, destination_ip, destination_port, protocol
192.168.227.102,123,192.168. 227.101,21,ftp
192.168.227.102,101,192.168. 227.101,21,ftp
192.168.227.105,445,192.168. 227.101,21,ftp
192.168.227.105,123,192.168. 227.101,21,ftp
192.168.227.105,65576,192.168. 227.101,22,ssh
192.168.227.109,123,192.168. 227.101,22,ssh
192.168.227.109,123,192.168. 227.101,22,ssh
192.168.227.109,3345,192.168. 227.101,22,ssh
192.168.227.233,123,192.168. 227.101,445,smb
192.168.227.233,123,192.168. 227.101,445,smb
192.168.227.233,111,192.168. 227.101,445,smb
192.168.227.202,123,192.168. 227.101,3302,smtp
192.168.227.202,233,192.168. 227.101,3302,smtp
192.168.227.102,123,192.168. 227.101,3302,smtp
192.168.227.102,123,192.168. 227.101,25,sql
192.168.227.102,123,192.168. 227.101,25,sql
For example:
The only destination_port and dest_ip are the latest ones and similarly with 
source ips. There is no record of  dest_port 3302 or 445 or 21, 22 etc in 
second graph. Where are thesepairs??

Any Suggestions??


 Regards,Aneela Safdar
__ _
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/ mailman/listinfo/dev





   ___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] sub query in siddhi QL

2016-08-29 Thread Aneela Safdar
Hi,
How can I achieve this sql in siddhi query languge:
select employee_id, (select count(*) from employees)
from employees
I want just a two columns of a stream, one legitimate and other is count of all 
records.
Thanks, Regards,Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Making use of a complete day data with in-memory table

2016-08-28 Thread Aneela Safdar
Hi,
I am interested in creating a pie chart of % of protocols in network traffic 
for a complete day which during a day keeps on updating with newer traffic 
events. I think event streams keep on discarding the previous data as new 
events arrive. Is it so? So as I have to need previous events along with 
incoming data, I decided to use event tables which keep data for a longer time 
but the thing is I need to join table with stream in order to make it of any 
use and If I do so I will be only using events that are in stream currently 
(not the one that are already stored and required for the chart).
/* Enter a unique ExecutionPlan */
@Plan:name('MAINExecutionPlan')

/* Enter a unique description for ExecutionPlan */
-- @Plan:description('ExecutionPlan')

/* define streams/tables and write queries here ... */

@Import('MAINInStream:1.0.0')
define stream MAINInStream (ts string, uid string, id_orig_h string, id_orig_p 
int, id_resp_h string, id_resp_p int, proto string, service string, duration 
double, orig_bytes long, resp_bytes long, conn_state string, local_orig bool, 
local_resp bool, missed_bytes long, history string, orig_pkts long, 
orig_ip_bytes long, resp_pkts long, resp_ip_bytes long, tunnel_parents string, 
sensorname string);

@Export('ProtocolStream:1.0.0')
define stream ProtocolStream (protocol string, count int);


define table mem_conn_table (timestamp string, id_orig_h string, id_orig_p int, 
id_resp_h string, id_resp_p int, proto string);

@info(data from stream to table in proper local date format )
from MAINInStream
select time:dateAdd(str:replaceAll(ts,'T',' '), 5, 'hour',"-MM-dd 
HH:mm:ss") as timestamp, id_orig_h, id_orig_p, id_resp_h, id_resp_p, proto
insert into mem_conn_table;

@info(From that table which contains all previous and newer data, take those 
records of current day and update column with protocol name)from 
mem_conn_table[time:dateDiff(time:currentTimestamp(), timestamp, "-MM-dd 
HH:mm:ss", "-MM-dd HH:mm:ss") == 0]
SELECT (ifThenElse(id_resp_p == 21,'FTP', ifThenElse(id_resp_p == 22,'SSH', 
ifThenElse(id_resp_p == 25,'SMTP', ifThenElse(id_resp_p == 
445,'SMB','MYSQL')  as protocol , count() as count
insert into ProtocolStream;

Its not working obviously as there is no join but how to make it work with the 
goal I mentioned? Regards, 
Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Scatter Plot missing values

2016-08-27 Thread Aneela Safdar
Hi,
I am trying scatter plot and there are some values missing in the final output 
I dont know why. I am plotting port_numbers against ip_addresses and the 
problem is its keeping only latest ip_address and port_number pair discarding 
any previous port_number related to that ip.
G1 : source_ip as X-axis, source_port as Y-axis and protocol as color (type - 
ordinal)
G12: destination_ip as X-axis, destination_port as Y-axis and protocol as color 
(type - ordinal)
Below plot is the result of following data
source_ip, source_port, destination_ip, destination_port, protocol
192.168.227.102,123,192.168.227.101,21,ftp
192.168.227.102,101,192.168.227.101,21,ftp
192.168.227.105,445,192.168.227.101,21,ftp
192.168.227.105,123,192.168.227.101,21,ftp
192.168.227.105,65576,192.168.227.101,22,ssh
192.168.227.109,123,192.168.227.101,22,ssh
192.168.227.109,123,192.168.227.101,22,ssh
192.168.227.109,3345,192.168.227.101,22,ssh
192.168.227.233,123,192.168.227.101,445,smb
192.168.227.233,123,192.168.227.101,445,smb
192.168.227.233,111,192.168.227.101,445,smb
192.168.227.202,123,192.168.227.101,3302,smtp
192.168.227.202,233,192.168.227.101,3302,smtp
192.168.227.102,123,192.168.227.101,3302,smtp
192.168.227.102,123,192.168.227.101,25,sql
192.168.227.102,123,192.168.227.101,25,sql
For example:
The only destination_port and dest_ip are the latest ones and similarly with 
source ips. There is no record of  dest_port 3302 or 445 or 21, 22 etc in 
second graph. Where are thesepairs??

Any Suggestions??


 Regards,Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Chart's coordinates of to be of string type

2016-08-24 Thread Aneela Safdar
Hi,
I am processing network traffic in real time using CEP and dashboard. The 
problem is there are situations where I like to make use of different charts 
like, line, area, scatter etc and need axis to be represented as IP-addresses 
or timestamps which are basically strings.

But most of these charts do not take axis as string except bar chart. How can I 
make use of other charts in that situation?
Thanks Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Notification facility in Analytics Dashboard

2016-08-23 Thread Aneela Safdar
Hi,
I am generating a bar chart from some log files in dashboard, there are times 
when bar raises high due to huge amount of  network traffic and as it is 
happening in real time, there might come a scenario when some body would 
overlook those high bars as chart is continuously being updated. I was 
wondering is there any notification or alert service available that I can use 
if bar goes higher than a certain threshold value?? If so what are my options? 
Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Getting accumulative values from stream

2016-08-23 Thread Aneela Safdar
Hi,
I have been using following siddhi query to get the events count per minute;  
ts as timestamp (string) and ftp_requests as count (int)

from FTPInStream[command == 'USER']
select time:timestampInMilliseconds(time:dateAdd(str:replaceAll(ts,'T',' '), 5, 
'hour',"-MM-dd HH:mm:ss"),'-MM-dd HH:mm') as milliseconds , uid, 
id_orig_h, id_orig_p, id_resp_h, id_resp_p
insert into intermediateStream;

from intermediateStream#window.externalTimeBatch( milliseconds ,1 min, 
milliseconds, 1 min)
select time:dateFormat(milliseconds, '-MM-dd HH:mm' ) as ts , 
cast(count(milliseconds), 'int') as ftp_requests
group by milliseconds
insert into FTPOutStream; There is a need to populate ftp_requests parameter of 
FTPOutStream as accumulative i.e. (each new no of requests is addition of 
itself and previously added to stream). To achieve this I changed the query as 
below:
from FTPInStream[command == 'USER']
select time:timestampInMilliseconds(time:dateAdd(str:replaceAll(ts,'T',' '), 5, 
'hour',"-MM-dd HH:mm:ss"),'-MM-dd HH:mm') as milliseconds , uid, 
id_orig_h, id_orig_p, id_resp_h, id_resp_p
insert into intermediateStream;

from intermediateStream
select milliseconds, cast(count(milliseconds), 'int') as ftp_request
group by milliseconds
insert into intermediateStream111;

from intermediateStream111#window.externalTimeBatch( milliseconds ,1 min, 
milliseconds, 1 min)
select time:dateFormat(milliseconds, '-MM-dd HH:mm' ) as ts , 
cast(sum(ftp_request), 'int') as ftp_requests
insert into FTPOutStream;

But I am getting nothing in ftp_requests parameter.
Any suggestions?
Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] wso2 DAS 3.1.0 RC1 dashboard browser compatility issues

2016-08-21 Thread Aneela Safdar
Hi,
I have been working on CEP for a while and now for some reasons I got shifted 
from CEP to DAS. I copied all receivers, streams, execution plans and 
publishers along with gadgets that I created in CEP to corresponding 
directories of DAS. However there seems to be some rendering issues of DAS 
dashboard with browser. After creating a dashboard and respective pages when I 
try to add gadgets in pages, they dont seem to be loaded and clicking is 
appearing ineffective at all. 

As I said there are some rendering issues, the main page on mozilla firefox 
looks like this

 Though browser is updated. I tried with chrome which renders main page quite 
nicely but I am still unable to load different pages and add gadgets to them.


Any suggestions?

Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] wso2das : Upgraded version with wso2cep 4.2.0

2016-08-21 Thread Aneela Safdar
Hi,
As there is a new candidate release of wso2cep, 4.2.0  is available and I am 
using some of the upgraded functions in siddhi query. I need to shift from cep 
to das but the new functions are unable to compile as I downloaded the latest 
version wso2das 3.0.1.
Is there any release of DAS having CEP 4.2.0 integrated?? Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] rdbms table data view

2016-08-18 Thread Aneela Safdar
I have created an rdbms table in an execution plan and write below query
@from(eventtable = 'rdbms' , datasource.name = 'WSO2_CARBON_DB' , table.name 
='ftp_log_table')
define table ftp_log_table (ts string, uid string, id_orig_h string, id_orig_p 
int, id_resp_h string, id_resp_p int, user string, password string,command 
string, arg string, mime_type string, file_size string, reply_code int, 
reply_msg string);

from FTPInStream
select *
insert into ftp_log_table; There is no error of invalidity but I haven't 
created this table before in the database. Also how can I view data in it? Is 
it going to store data permanently or a long period of time for further 
correspondence?

Regards, 
Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Notification of any received events in execution plan

2016-08-14 Thread Aneela Safdar
Hi,
I have for now created a siddhi query that receive events and after a little 
processing send them to dashboard where a bar chart display events. I am 
receiving events and sending their timestamps (ts)  as string and number of 
events (count) as integer to a stream, bar chart displays count on y-axis and 
ts on x-axis. So for timestamps for which events received, count is shown on 
the chart.
But I want to set count default value 0 and keep sending increamented 
timestamps and count value to dashboard even in absence of any events. As 
timestamps are increamented per minute, all I have to do (atleast as far as I 
think) is to start a loop which keep sending default events (ts=next_min, 
count=0) after waiting for one minute and loop should continue unless I further 
receive  any event. I was wondering if there is any notification available for 
received events which I could use to break the loop or there is some default 
function in wso2 siddhi which does this?
I hope I am able to make clear what I require.


Need to insert 0s between two timestamps with interval of a min, i.e. 
(2016-08-12 11:33, 0), (2016-08-12 11:34, 0),...,(2016-08-12 11:37, 0)
Thanks, Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Stroring event data in tables in addition to display

2016-08-14 Thread Aneela Safdar
Hi,
I have been doing  a project in wso2cep to take some log files, perform queries 
in execution plans and then direct results to dashboard where a bar chart is 
displaying them.
In addition to just showing bars of events, now I want to store the data in db 
too so I could see what happened previously and so. Till now I have only worked 
with streams and there are few questions I need to ask before moving to tables.
   
   - Should I be installing and configuring a new database as there are some 
options given in documentation or I will be able to work with default database 
and configurations?
   - Do tables and streams both work side by side or I have to shift to one of 
them as when I create a gadget, it first asks me about source that is it a 
stream or table?

Thanks, 

Regards, 
Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] RC1 release WSO2CEP-4.2.0 : Error while creating gadget

2016-08-10 Thread Aneela Safdar
I have donwloaded RC1 release of wso2-4.2.0 and during creating gadget, I am 
encountered with following error:

Something went wrong while initiating Gadget generation wizard. Please see the 
detailed error message below. 

   Internal 
Server Error - Error 500 h1,h3,h4{text-align: 
center;font-weight: 200;} a{color: #2578ff} body{border-top:solid 20px 
#444;padding:0;margin:0;}   Error 500 Something went wrong and we're trying 
to fix it. Please check back later Visit Portal  Any suggestions?

Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Donwloading latest wso2cep 4.2.0 release

2016-08-07 Thread Aneela Safdar
Hi,
I am trying to download new release of wso2cep but on download page it is still 
giving me the older version.
Any suggestion?


 Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Updating an output stream in Siddhi Query

2016-08-06 Thread Aneela Safdar
Hi,
I have a siddhi query to get the count of total events in one minute by using a 
timebatch window. Using an output stream I am updating a bar chart with 
constant coming values, tmestammps(date and time,till minute ) on x-axis and 
events count on y-axis. 

But there are sometimes when either the number of events in one minute take too 
long to be transmitted and hence query doesnot give correct resutls. 

For instance if I get total 60 events and this query first gives me the count 
of 40 which dislpayed in bar chart but then after a minute it changes its value 
to 20 which is correct according to the logic but I am concerned if there is a 
way I could update the stream as well as bar chart for any previous timestamps 
(in that case 40+20) and insert into it new values for the next upcoming 
timestamps. 

I have seen update function is used with tables not stream, is it so?And also I 
want two outputStreams populating two different bar charts from a same input 
stream. So is below query correct for that purpose?

Query is:
/* Enter a unique ExecutionPlan */
@Plan:name('FTPExecutionPlan')

/* Enter a unique description for ExecutionPlan */
-- @Plan:description('ExecutionPlan')

/* define streams/tables and write queries here ... */

@Import('FTPInStream:1.0.0')
define stream FTPInStream (ts string, uid string, id_orig_h string, id_orig_p 
int, id_resp_h string, id_resp_p int, user string, password string,command 
string, arg string, mime_type string, file_size string, reply_code int, 
reply_msg string);

@Export('FTPIPOutStream:1.0.0')
define stream FTPIPOutStream (ip_address string, ftp_requests int);

@Export('FTPOutStream:1.0.0')
define stream FTPOutStream (ts string, ftp_requests int);


from FTPInStream
select time:dateFormat(str:replaceAll(ts,'T',' '),'-MM-dd HH:mm', 
'-MM-dd HH:mm:ss') as ts, uid, id_orig_h, id_orig_p, id_resp_h, id_resp_p
insert into intermediateStream;

from intermediateStream#window.timeBatch(1 min)
select ts, cast(count(ts), 'int') as ftp_requests
group by ts
insert into FTPOutStream;

from intermediateStream#window.timeBatch(1 min)
select id_orig_h as ip_address, cast(count(id_orig_h), 'int') as ftp_requests
group by id_orig_h
insert into FTPIPOutStream; Regards, 
Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Importing samples of wso2cep in developer-studio-eclipse

2016-07-24 Thread Aneela Safdar
Hi,
I am trying to import http sample of wso2cep in eclipse-developer-studio with 
File-->New--->Java--->Java Project From Existing Build File

but it isn't importing the src folder in eclipse. How am I suppose to make this 
import successful? I have used complete installation of wso2 developer studio.

Kindly help.
 Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] DASHBOARD: Bar chart isn't displaying results in expected manner

2016-06-24 Thread Aneela Safdar
Hi all,

I am using bar chart to display results outputted from execution plan.
My output stream has results in form:
           ts    logins1.
2016-05-08 08:59    12.2016-05-08 09:00 
   53.2016-05-08 09:01    14.
2016-05-08 09:13    55.2016-05-08 09:14 
   2

I set x-axis as ts and y-axis as logins
Following are the problems I am dealing with:
1.y-axis values are in ascending order from top to bottom and I want vice 
versa.2.Bars are not being displayed at all on graph. It just looks like a 
blank graph having intervals marked on it.Below is aforementioned chart.


Thanks,

Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Custom configuration of gadget in dashboard

2016-06-23 Thread Aneela Safdar
Hi all,
I am trying to use a ui publisher with a line (chart type) single column 
gadget. I have a real stream with two attributes which I want to set x and y 
axis. But configuration does not allow me to select any of this attribute in 
drop down of x-axis (however it does allow me when I select bar chart). Also I 
want control of intervals of axis to set. 

Any help willbe appreciated. Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Siddhi Query : group by results

2016-06-22 Thread Aneela Safdar
Hi all,
  I am having a trouble in digesting results of my group by query. My source 
stream named intermediateStream has data ts   uid   
  id_resp_h
2016-05-08 08:59  CLuCgz3HHzG7LpLwH9172.30.26.119
2016-05-08 09:00  C3WnnK3TgUf2cSzxVa172.30.26.127 
2016-05-08 09:00  C3WnnK3TgUf2cSzxff172.30.26.119
SIDDHI query is from intermediateStream
select ts, count(ts) as ssh_logins
group by ts
insert into SSHOutStream;
I am expecting output to be likets ssh_logins
2016-05-08 08:59   1
2016-05-08 09:00   2  
But instead it returns ts ssh_logins
2016-05-08 08:59   1
2016-05-08 09:00   1
2016-05-08 09:00   2
Any suggestions?  Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Event Receiver does not take events having any parameter name containing dots (.)

2016-06-21 Thread Aneela Safdar
Hi all,
My json custom formatted events are from a log file which contains parameters 
names with dots. i.e. sample event is 

{"ts":"2016-05-08 
08:59:47.363764Z","uid":"CLuCgz3HHzG7LpLwH9","id.orig_h":"172.30.26.119","id.orig_p":51976,"id.resp_h":"172.30.26.160","id.resp_p":22,"version":2,"client":"SSH-2.0-OpenSSH_5.0","server":"SSH-2.0-OpenSSH_6.6.1p1
 
Ubuntu-2ubuntu2.6","cipher_alg":"arcfour256","mac_alg":"hmac-md5","compression_alg":"none","kex_alg":"diffie-hellman-group-exchange-sha1","host_key_alg":"ssh-rsa","host_key":"8d:df:71:ac:29:1f:67:6f:f3:dd:c3:e5:2e:5f:3e:b4"}

But event receiver does not take them and gives mapping errors saying: 

Could not find any matches for the incoming event with JSONPath : 
com.jayway.jsonpath.JsonPath@543abe49 ,hence dropping the event
How can I make receiver to accept such parameters?
Also unless I separate two events with *, it doesn't receive any further 
event. Sample 0002 have httpReceiver.txt file that contains events in this 
particular pattern but I dont have any such separation in my log file. How to 
make that work?

Any help will be appreciated.
Thanks
 Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Custom Input Mappings JSON : Could not find any matches for the incoming event with JSONPath

2016-06-20 Thread Aneela Safdar



Hi,
I have an event receiver with custom input mapping as my event format was a 
little different. It has no meta or correlational attributes.  
Example is:
{"ts":"2016-05-08T08:59:47.363764Z",
"uid":"CLuCgz3HHzG7LpLwH9",
"id.orig_h":"172.30.26.119",
"id.orig_p":51976,
"id.resp_h":"172.30.26.160",
"id.resp_p":22,
"version":2,
"client":"SSH-2.0-OpenSSH_5.0",
"server":"SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6",
"cipher_alg":"arcfour256",
"mac_alg":"hmac-md5",
"compression_alg":"none",
"kex_alg":"diffie-hellman-group-exchange-sha1",
"host_key_alg":"ssh-rsa",
"host_key":"8d:df:71:ac:29:1f:67:6f:f3:dd:c3:e5:2e:5f:3e:b4"}
There is no newline, I have added to make it readable. Accordingly I created an 
event receiver with a custom input mapping :

http://wso2.org/carbon/eventreceiver;>
    
    all
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

The sample event of input stream is :
{
    "event": {
    "payloadData": {
    "ts": "data5",
    "uid": "data5",
    "id_orig_h": "data1",
    "id_orig_p": 70,
    "id_resp_h": "data3",
    "id_resp_p": 4,
    "version": 50,
    "client": "data1",
    "server": "data2",
    "cipher_alg": "data5",
    "mac_alg": "data3",
    "compression_alg": "data3",
    "kex_alg": "data4",
        "host_key_alg": "data4",
    "host_key": "data4"
    }
    }
}
I dont have event and payload tags in my events as it is a simple log file. 
When I try to send events, I got an error on console saying :


ERROR {org.wso2.carbon.event.receiver.core.internal.type.json.JSONInputMapper} 
-  Could not find any matches for the incoming event with JSONPath : 
com.jayway.jsonpath.JsonPath@543abe49 ,hence dropping the event

Have I done custom input mapping wrong or what else I need to do? Regards, 
Aneela Safdar

  ___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error : Stream Definition already exists

2016-06-18 Thread Aneela Safdar

The query I am trying to make work is :

@Import('SSHInStream:1.0.0')
define stream SSHInStream (ts string, uid string, id_orig_h string, id_orig_p 
int, id_resp_h string, id_resp_p int, version int, client string, server 
string, cipher_alg string, mac_alg string, compression_alg string, kex_alg 
string, host_key_alg string, host_key string);
@Export('SSHOutStream:1.0.0')
define stream SSHOutStream (ts string, ssh_logins int);

from SSHInStream
select time:dateFormat(ts,'-MM-dd HH:mm') as ts, uid, id_orig_h, id_orig_p, 
id_resp_h, id_resp_p 
insert into intermediateStream;

from intermediateStream
select ts, count(ts) as ssh_logins
group by ts
insert into SSHOutStream;

And the error it generates is :
Different definition same as output stream definition 
:StreamDefinition{id='SSHOutStream', attributeList=[Attribute{id='ts', 
type=STRING}, Attribute{id='ssh_logins', type=LONG}], annotations=[]} already 
exist as:StreamDefinition{id='SSHOutStream', attributeList=[Attribute{id='ts', 
type=STRING}, Attribute{id='ssh_logins', type=INT}], 
annotations=[Annotation{name='Export', elements=[Element{key='null', 
value='SSHOutStream:1.0.0'}]}]} in execution plan "ExecutionPlan"
I am having a hard time to understand why compiler considering same streams as 
two duplicates? I have studied samples given in WSO2CEP documentation and they 
use the same syntax. Please help.
 Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Configuring Mailing List Settings

2016-06-17 Thread Aneela Safdar
Hi,
I have just subscribed this mailing list but I am concerned about the number of 
irrelevant emails I am getting. Is it possible to receive only responses to my 
questions? And if possible how can I perform these particular settings?
Thanks, Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] no viable alternative at input @import

2016-06-17 Thread Aneela Safdar
Hi,

I am a newbie here and trying to write a simple siddhi query by simply 
importing a custom mapped stream. But as soon as I import it and validate 
query, it gives above error.
My complete query however is
@Import('bro.in.ssh.log:1.0.0')
define stream inStream (ts string, uid string, id.orig_h string, id.orig_p int, 
id.resp_h string, id.resp_p int, version int, client string, server string, 
cipher_alg string, mac_alg string, compression_alg string, kex_alg string, 
host_key_alg string, host_key string);

@Export('bro.out.ssh.log:1.0.0')
define stream outStream (ts string, ssh_logins int);

from inStream
select dateFormat (ts,'-MM-dd HH:mm') as formatedTs, count
group by formatedTs
insert into outStream;
All I want to do is to count number of records in a log for a single minute and 
export that time and count to an output Stream. But I am getting errors even at 
the very first line.
 Regards, Aneela Safdar___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev