Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Query - time4.query : {
- "dataSource": "rb_flow_f6f6bbfc-c5b7-4280-a9d4-25a222a441b5",
- "granularity": "all",
- "intervals": [
- "2016-10-25T03:00:00+02:00/2016-10-25T04:00:00+02:00"
- ],
- "filter": {
- "type": "or",
- "fields": [
- {
- "type": "selector",
- "dimension": "type",
- "value": "snmp-stats"
- },
- {
- "type": "selector",
- "dimension": "type",
- "value": "meraki"
- }
- ]
- },
- "queryType": "timeseries",
- "context": {
- "skipEmptyBuckets": "true"
- },
- "aggregations": [
- {
- "type": "longSum",
- "name": "flows",
- "fieldName": "events"
- },
- {
- "type": "filtered",
- "filter": {
- "type": "selector",
- "dimension": "type",
- "value": "meraki"
- },
- "aggregator": {
- "type": "hyperUnique",
- "name": "visitors",
- "fieldName": "clients"
- }
- }
- ],
- "postAggregations": [
- {
- "name": "visitors_float",
- "type": "javascript",
- "fieldNames": [
- "flows",
- "visitors"
- ],
- "function": "function (value, visitors) { return visitors; }"
- }
- ]
- }
- Result:
- [
- {
- "timestamp": "2016-10-25T01:00:00.000Z",
- "result": {
- "visitors": 11259.898751496865,
- "visitors_float": "NaN",
- "flows": 25328
- }
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement