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

2015-05-14 Thread Anish Mehta
Where do you get the "Error: 'NoneType' object has no attribute ‘iterates’” reply? Were you using “contrail-stats”, or issuing a POST to the Analytics API? After trying the query, please send these files: /var/log/contrail/contrail-analytics-api.log /var/log/contrail/contrail-analytics-api-stdou

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 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 record StatsTable samples for strings, ints and doubles. Starting in R2.2, we do support structs and lists-of-str

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 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 mainline branches. If you aren’t sure if your image has MAX and MIN, try to access this schema via the Analytics API: http://xx.xx.xx.xx:8081/analytics/table/StatTable.AnalyticsCpuState

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 Anish Mehta
Hi Alberto, The ³aggtype² annotation in the sandesh file refers to the Analytics GET API for UVEs. It is unrelated to the Analytics Query API. For the Analytics GET API, we support the following aggregations: aggtype=³sum² (for integers or doubles) aggtype=³union² (for lists of strings or structu

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 Anish Mehta
Hi Alberto, You have used "dtrace" instead of "dTrace" for val1 and val2. As Raj stated in his email, we usually use T= in conjunction with at least one aggregate column like SUM(xyz) to get time series. E.g. [T=60 , SUM(dTrace.val1) , dTrace.val2] will give one time series for SUM(dTrace.val1

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

2015-05-07 Thread Raj Reddy
You can either select "T=" & SUM(xyz) [this gives time series values] *or* "T" & XYZ [this gives raw values] One of the below will work "select_fields": [ "T=","COUNT(dTrace)", "SUM(dtrace.val1)", "SUM(dtrace.val2)" ], or "select_fields": [ "T","COUNT(dTrace)", "dtrace.val1", "d

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 Megh Bhatt
Hi Albero, trace is a keyword, please change name to data_trace. Also please have optional bool deleted as element number 2 and then you should be good to go Thanks Megh > On May 6, 2015, at 6:57 AM, "aguti...@ac.upc.edu" wrote: > > Hi anish, > > Thanks for your reply. > > In that exam

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 Anish Mehta
Hi Alberto, I assume you are talking about the stats functionality, which is turned on using the “tags” annotation. I can help more if you send the sandesh file Meanwhile, I will demonstrate this feature using Analytics CPU Info. This is the sandesh file: struct AnalyticsCpuState { 1: stri

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 Anish Mehta
Hi Alberto. The schema looks correct. Both contrail-logs and the Query API use the _STAT_TABLES variable. They should work if you change that variable as directed. Please send me the output of "contrail-logs —help”, and the contents of your viz/constants.py file. Lets work on the UVE part. This

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 Anish Mehta
Hi Alberto, Adding your own table is possible. You need to add some entries to /controller/src/analytics/viz.sandesh It does not need the collector to be rebuilt, but it does require rebuilding contrail-analytics-api. I’m going to assume the table name “ObjectAlberto” (instead of “ObjectTableNa

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

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

2015-04-22 Thread Anish Mehta
The schemas for new Sandesh types do not need to be compiled or loaded onto the Collector. The collector gets XML-encoded messages from the generators and stores them according to their sandesh types and the contained annotations. Sandesh Types and how they work are explained here: http://www.ope

[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