akumuli / Akumuli

Time-series database
http://akumuli.org
Apache License 2.0
837 stars 85 forks source link

grafana requests to akumuli #360

Open igor-zacharov opened 4 years ago

igor-zacharov commented 4 years ago

This is rather a question, not sure if it may be my ignorance. I'm using akumuli 0.8.72, grafana 6.6.1, akumuli-datasource 1.3.11

In a panel that plots multiple series I get error "Annotation Query Failed res.data.startsWith is not a function" and "bad metric name received" if at least one of the series is not found for combination of metrics and tags in one of the queries. Other queries may be successful for the same panel but due to the error nothing is drawn.

Can akumuli avoid returning error and just return what's available? Or is it something I should set myself in grafana as part of the panel definition?

Thank you, Igor.

Lazin commented 4 years ago

It looks like the error is in the plugin. Could you please attach the query that causes this error and the result (if it doesn't have any sensitive information).

igor-zacharov commented 4 years ago

Eugene,

here is more evidence for the problem of error "Not found". I specify two queries, 1st with data found and the 2nd with tag that doesn't match any data. But I expect grafana to make the plot for the data which is found and ignore the error for the data which is not found.

I have added the files: 1) screenshot of the request from grafana which ends in error Grafana-error_req-1.PNG text file of the same Grafana-error_req-1.txt text of the Grafana query returned: Grafana-error_resp-1.txt screenshot of the grafana panel that shows how the tags are specified: Grafana-error_req-2.PNG here the cpu.temp is the one which is found, while net.if_temp with tag net_if=eth_log is not found

2) screenshot of the request when I remove the tag that leads to the data not found: Grafana-error_resp-2.PNG 3) same request when I allow for series with NULL or ZERO data in them: Grafana-error_resp-3.PNG This shows that data exists, but just not matching the tag specified.

If there is only one metric to plot and the tag does not match the data, then the error returned "data not found" is appropriate.

Thank you, Igor.

On Fri, Jun 5, 2020 at 10:05 PM Eugene Lazin notifications@github.com wrote:

It looks like the error is in the plugin. Could you please attach the query that causes this error and the result (if it doesn't have any sensitive information).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akumuli/Akumuli/issues/360#issuecomment-639723756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5KKI5GMTJOARHMWXHNXOTRVE6YVANCNFSM4NTLMNBA .

$host Internal Temperatures 2 queries - 1 data source - N/Ams


Object state:"Error" series:Array[0] request:Object app:"dashboard" requestId:"Q172" timezone:"" panelId:13 dashboardId:25 range:Object from:p _isAMomentObject:true _isUTC:false _pf:Object _locale:O _d:Date _isValid:true to:p raw:Object from:"now-5m" to:"now" timeInfo:"" interval:"200ms" intervalMs:200 targets:Array[2] 0:Object aggregator:"sum" alias:"CPU max Temp" currentTagKey:"" currentTagValue:"" downsampleAggregator:"mean" downsampleFillPolicy:"none" downsampleInterval:"$samp" hide:false metric:"cpu.temp[C]" refId:"H" tags:Object topN:"1" datasource:undefined 1:Object aggregator:"sum" alias:"$net_if Temp" currentTagKey:"" currentTagValue:"" disableDownsampling:false downsampleAggregator:"mean" downsampleFillPolicy:"none" downsampleInterval:"$samp" hide:false metric:"net.if_temp[C]" refId:"G" tags:Object host:"$host" net_if:"eth_log" topN:"" datasource:undefined maxDataPoints:1873 scopedVars:Object interval:Object text:"200ms" value:"200ms" interval_ms:Object text:"200" value:200 cacheTimeout:undefined startTime:1591454319248 rangeRaw:Object from:"now-5m" to:"now" timeRange:Object from:p _isAMomentObject:true _isUTC:false _pf:Object _locale:O _d:Date _isValid:true to:p raw:Object error:Object message:"not found " timings:Object dataProcessingTime:0.00500003807246685

{ "request": { "method": "POST", "url": "api/datasources/proxy/3/api/query", "data": { "group-aggregate": { "metric": "cpu.temp[C]", "step": "2m", "func": [ "mean" ] }, "range": { "from": "20200606T150033.611", "to": "20200606T145533.611" }, "where": [ { "boot": "1591177634", "cpu_name": "4", "crtx": "1", "host": "pcalc-10-A119K430001", "ndevs": "2", "netws": "9", "ngpu": "2", "nproc": "20" } ], "order-by": "series", "apply": [], "limit": 1000000 } }, "response": "+cpu.temp[C]:mean boot=1591177634 cpu_name=4 crtx=1 host=pcalc-10-A119K430001 ndevs=2 netws=9 ngpu=2 nproc=20\r\n+20200606T150033.611000000\r\n1\r\n+33.783333333333331\r\n+cpu.temp[C]:mean boot=1591177634 cpu_name=4 crtx=1 host=pcalc-10-A119K430001 ndevs=2 netws=9 ngpu=2 nproc=20\r\n+20200606T145833.611000000\r\n1\r\n+33.545454545454547\r\n+cpu.temp[C]:mean boot=1591177634 cpu_name=4 crtx=1 host=pcalc-10-A119K430001 ndevs=2 netws=9 ngpu=2 nproc=20\r\n+20200606T145633.611000000\r\n*1\r\n+34\r\n" }