Showing an aggregation in Kibana dashboard?

Hi, I'm trying to build an aggregation and show the number in Kibana I have
the agg working in sense, but when I try to move it to my .js dashboard, I
can't get it to publish the aggregation (in this case an expected value of
"2". I guess overall my question is how do I integrate an aggregation into
a .js dashboard. Does the agg belong in the services: queries part of the
dashboard or elsewhere? Details below.

###################################
Here is the aggs in sense:

GET /events/_search?search_type=count
{
"aggs": {
"machine_devices": {
"cardinality": {
"field": "logsource"
}
}
}
}

and it properly returns :

"took": 7,
...omitted for brevity
},
"aggregations": {
"machine_devices": {
"value": 2
}

####################################
And here is the dashboard.js script

"8": {

 "id": 8,

 "enable": true,

 "aggs": {

   "machine_devices" : {

     "cardinality" :

       { "field": "logsource" }

   }

 }

}

...omitted for brevity

{

title: 'Devices',

field: 'machine_devices',

type: 'terms',

chart: 'table',

order: 'term',

counter_pos: 'none',

missing: false,

other: false,

size: '10',

editable: _editable,

spyable: _spyable,

time_field: ARGS.timefield||"@timestamp",

queries: {

  'mode': 'selected',

  ids: [8]

},

span: 2

}

Thanks for your help. ES rocks.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a4b34a10-e114-45fe-aad3-7bea06b58d7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.