Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-14 Thread agutierr
Hi, I tried to do a workaround but it was somehow unsuccessful. We have the following structure: struct VMUsageObject { 1: string cache_id 2: string vm_id 3: double cpu_used 4: u64mem_used } struct VMServiceObject { 1: string cache_id 2: string vm_id 3: string service_id 4:

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-14 Thread agutierr
Hi Anish, Thanks for your reply. We will use that workaround. Best Regards, Alberto. Quoting Anish Mehta : Hi Alberto, For ObjectTables (Using "table":"ObjectAlberto" for queries) , the list and map should work fine. But for StatsTables, the answer is more complicated. Upto R2.1, we only r

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-13 Thread agutierr
Hi, Another question: Is it possible to have lists/maps and get them in a query? For example: struct VMInfoObject { 1: string cache_id 2: string vm_id 3: double cpu_used 4: u64 mem_used 5: map s

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-13 Thread agutierr
Hi Anish, We have R2.1 and in with that GET query I only see SUM aggregation, so we will have to make it just with SUM. Thanks for your support! Alberto. Quoting Anish Mehta : Hi Alberto, Support for MAX and MIN is not in R2.1 or earlier release. You will see it if you use the R2.2 or m

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-12 Thread agutierr
Hi Anish, Thanks for your reply. I'm now doing the following query: { "end_time": "now", "select_fields": [ "T=30s", "COUNT(dTrace)", "SUM(dTrace.val1)", "SUM(dTrace.val2)", "SUM(dTrace.val3)", "MAX(dTrace.val2)", "MIN(dTrace.val3)" ], "sort_fields": [], "start_t

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-11 Thread agutierr
Hi, That was a silly mistake, excuse me. It works now! Now I have a doubt about aggregation types. I asked before about which kind of aggregations there are and it seems that there are SUM, AVG, UNION, MIN and MAX at least (correct me if I'm wrong). I want to have MIN and MAX along SUM in

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-07 Thread agutierr
Hi Megh and Anish, Thanks for your support. Making the query to the UVE I get the following: { "AlbertoAgent": { "cpu": 31337, "dTrace": [ { "StatTable.AlbertoAgent.dTrace": [ { "COUNT(dTrace)": 1,

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-06 Thread agutierr
Hi anish, Thanks for your reply. In that example, aggregation type "union" is applied over all the elements of type ProcessCpuInfo? I have adapted my structure following your example: struct DataTrace { 1: u64 val1 2: u64 val2 } struct AlbertoAgent { 1: string name

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-04 Thread agutierr
Hi, Any clues about how can I make a flow like the ones from Analytics node CPU info? I cannot figure how to do it with sandesh. Is it done using list type? Best Regards, Alberto. Quoting aguti...@ac.upc.edu: Hi Anish, There was a mistake in the changes I did. Now it's correct and I g

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-04-24 Thread agutierr
Hi Anish, There was a mistake in the changes I did. Now it's correct and I get this: agutierrez@Mahalanobis:~/Documents/thesis/OpenContrail/query$ ./getQuery.sh /uves/alberto/lvelasco?flat % Total% Received % Xferd Average Speed TimeTime Time Current

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-04-24 Thread agutierr
Hi, I compiled viz.sandesh using "Sandesh --gen py viz.sandesh" directly and I substituted the .py. I done this using the same structure as before but changing the name of the table and following your instructions, but I have problems with it. I get this schema as the table schema: {

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-04-24 Thread agutierr
Hi Anish, Thank you for your reply. I'm having the following problem when compiling: ... Running virtualenv with interpreter testroot/bin/python New python executable in analytics_test/bin/python Installing Setuptools.

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-04-23 Thread agutierr
Hello Anish, Thanks for your reply. What we are going to do is a little application that sends it's own metrics to the collector so we can retrieve that data using de Analytics API. For example: struct TestAgent { 1: string name(key="ObjectTableName") 2: optional i32 value

[opencontrail-dev] New custom node questions

2015-04-22 Thread agutierr
Dear all, We are trying to develop a custom node with the purpose of monitoring some variables. We will just send data to the analytics' collector. Does this kind of communication need any kind of subscription for the node to be able to communicate correctly with the collector? Do we need

[opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-04-22 Thread agutierr
Dear all, When creating a new sandesh structure, do I need to send somehow the schema to the collectors so they will understand it or it will be added automatically with the first message it recieves? Thanks for your attention, Alberto. ___ Dev

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-15 Thread agutierr
Hi Megh, Thanks for the support. I'll take a look at the diff and at this mock_generator. I have to apologize for the replies that my mail client is sending to the list (the same message repeated). I'll fix it soon. Quoting Megh Bhatt : Hi Alberto, You can take a look at https://gith

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-14 Thread agutierr
Hi, I have established 2 loops after connectToCollector. One that waits the sm to change to state 2 (Connected) and one that waits for state 4 (Established). Just after connectToCollector the status is 0. Then, eventually, it changes to 1 (Disconnected). Then to 2 and stays there. An extr

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread agutierr
Hi Megh, Thank you for the reply. I already went thru client_sm module but didn't get any clue about when does the state change, thanks. You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried to make a loop with that condition (negated) but it seems to stay forever th

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread agutierr
Hi Megh, Thank you for the reply. I already went thru client_sm module but didn't get any clue about when does the state change, thanks. You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried to make a loop with that condition (negated) but it seems to stay forever th

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread agutierr
Hi, I got the following code modifying the test suite available in the Sandesh C++ library folder: int port = 8086; ASSERT_LT(0, port); std::cout << "Initializing Generator" << std::endl; Sandesh::InitGenerator("SandeshUVEAlarmTest-Client", "192.168.100.1", "Test", "0", evm_

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-09 Thread agutierr
Hi Megh, Thanks for your help. With that I think I got the compilation at hand. Now I'm trying to do a small application to send one message and die. I defined the following toy sandesh for testing: struct UveVirtualNetworkAgent { 1: string name(key="ObjectVNTable") 2: optional i32 cpu

[opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-08 Thread agutierr
Dear all, I'm trying to create a new message to send with Sandesh protocol, however I don't know how to compile the generated code. We intend to use this messaging for testing purposes (at the moment) by means of an extra application which will send Sandesh messages each second. I have f