Slackbot
12/12/2023, 7:06 AMvivek kalola
12/12/2023, 7:08 AMSergio Ferragut
12/12/2023, 5:17 PMvivek kalola
12/12/2023, 5:20 PM{
"queryType": "groupBy",
"dataSource": "snmp_interface",
"granularity": "five_minute",
"dimensions": [
"device",
"interface"
],
"limitSpec": {
"type" : "default",
"limit" : 10000,
"columns" : [{
"dimension" : "_ordered",
"direction" : "descending"
}]}
"aggregations": [
{
"type": "doubleMin",
"name": "interface.received.octets",
"fieldName": "interface.received.octets"
},
{
"type": "doubleSum",
"name": "interface.out.packets",
"fieldName": "interface.out.packets"
},
{
"type": "stringLast",
"name": "_ordered",
"fieldName": "__time"
}
],
"intervals": [
"2023-12-11/2023-12-13"
]
}vivek kalola
12/12/2023, 5:21 PM{
"queryType": "timeseries",
"dataSource": "snmp_interface",
"granularity": "minute",
"descending": "true",
"aggregations": [
{
"type": "stringLast",
"name": "interface",
"fieldName": "interface"
},
{
"type": "stringLast",
"name": "device",
"fieldName": "device"
},
{
"type": "longSum",
"name": "interface.out.packets",
"fieldName": "interface.out.packets"
},
{
"type": "longSum",
"name": "interface.received.octets",
"fieldName": "interface.received.octets"
}
],
"intervals": [
"2023-12-11/2023-12-13"
]
}vivek kalola
12/12/2023, 5:21 PMSergio Ferragut
12/12/2023, 5:37 PMSELECT FLOOR(__time, 'PT5M') time_bucket, interface, device, SUM(octets) sum_octets, SUM(packets) sum_packets
FROM snmp_interface
WHERE TIME_IN_INTERVAL(__time, '2023-12-11/P1D')
GROUP BY 1,2,3
ORDER BY time_bucket DESC
LIMIT 1000
You can plug that into the Console and ask for an Explain to get the Native Query version of it.vivek kalola
12/13/2023, 7:20 AMall interfaces in druid, show the historical trend view of packets with the granularity of five_minutes for todayJK Biraj
12/15/2023, 6:11 AM