Hello,
ClickHouse connected into Grafana as a source. I have an issue when trying to create visualization (table). I create next query:
SELECT toDateTime(t / 1000) + 3600*3 as deviceReceiptTime, deviceAddress, deviceVendor, deviceProduct, deviceVersion, eventId, deviceEventCategory, severity, name, sourceTime, deviceHostName, deviceProcessName, sourceHostName, sourceAddress, sourcePort, sourceUserName, destinationAddress, destinationHostName, destinationUserName, destinationPort, reason, requestUrl, applicationProtocol, deviceCustomString1, deviceCustomString2 FROM ( SELECT $timeSeries as t, deviceAddress, deviceVendor, deviceProduct, deviceVersion, eventId, deviceEventCategory, severity, name, sourceTime, deviceHostName, deviceProcessName, sourceHostName, sourceAddress, sourcePort, sourceUserName, destinationAddress, destinationHostName, destinationUserName, destinationPort, reason, requestUrl, applicationProtocol, deviceCustomString1, deviceCustomString2 FROM seo.DATA_mwg_F WHERE $timeFilter UNION ALL SELECT $timeSeries as t, deviceAddress, deviceVendor, deviceProduct, deviceVersion, eventId, deviceEventCategory, severity, name, sourceTime, deviceHostName, deviceProcessName, sourceHostName, sourceAddress, sourcePort, sourceUserName, destinationAddress, destinationHostName, destinationUserName, destinationPort, reason, requestUrl, applicationProtocol, deviceCustomString1, deviceCustomString2 FROM seo.DATA_asa_F WHERE $timeFilter ) WHERE deviceVendor in ($deviceVendor) and deviceAddress in ($deviceAddress) and severity in ($severity) and sourceAddress in ($sourceAddress) and sourceUserName in ($sourceUserName) ORDER BY deviceReceiptTime DESC
And it’s work correct. But when i’m trying to add another one variable in condition WHERE, my query become broken. I have an error Bad Request.
Seems, like Grafana can’t take into input too long query, because in variables quite a lot of values. Also this query correctly work directly in clickhouse and i haven’t got any problems.
Any suggestions? Thx!