grafana-timelion-datasource
grafana-timelion-datasource copied to clipboard
HTTP Error Not Found
kibana v6.2.3 grafana v5.0.3
Install cmd :
grafana-cli --pluginUrl https://github.com/gbrian/grafana-timelion-datasource/archive/master.zip plugins install grafana-timelion-datasource
Timelion host-url: http://localhost:5601/app/timelion (works witch curl and browser)
Grafana UI-Response :
HTTP Error Not Found
grafana.log:
lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/10/run status=404 remote_addr=127.0.0.1 time_ms=9 size=69 referer=https://my-pub-url/datasources/edit/10
Some one else with the same issue ?
Same issue. Kibana 6.0.1 Grafana 5.1.2
Plugin tries to execute GET method on /run location. But, as soon as i using AWS ES stack, only POST method allowed.
HI @Mitrofanov , Where did you read about POST for AWS? Can you post the link and I'll try to make it compatible Thanks @repofunding support repofunding
:wave: Hi, @repofunding is helping @manni8 on maintaining this repository. We are an open source initiative aiming to help developers on maintain their projects by using crowdfunding.
Why using repofunding for this project?
Supporting
- You can support this repository by providing a pull request here
- Crowdfunding this issue with:
Important
@repofunding status is prototye be patiente :wink: don't hesitate to contact us
tags: crowdfunding
@manni8
http://localhost:5601/app/timelion
used with grafana proxy mode will resolve to the same machine as grafana. Is that correct?
@gbrian I've just tried to debug the error message and tried to GET the config url. I get the following from AWS ES service:
{"error":"Incorrect HTTP method for uri [/api/timelion] and method [GET], allowed: [POST]","status":405}
@Mitrofanov ,
Ok, found. The GET
request is executed as part of the TEST
method during data source definition.
Currently, you can ignore this error and just try the Timelion data source on a dashboard. I'll fix this behavior asap. Hope this helps.
So i tried to use plugin but looks like it's not works. It returns no datapoints. Here is Grafana's query inspector output:
xhrStatus:"complete"
request:Object
method:"POST"
url:"api/datasources/proxy/8/run"
data:Object
sheet:Array[1]
0:",.es(*)"
time:Object
from:"2018-05-12T16:17:06 +0300"
interval:"auto"
mode:"absolute"
timezone:"GMT"
to:"2018-05-14T16:17:06 +0300"
response:Object
_index:"api"
_type:"timelion"
_id:"run"
_version:22
result:"updated"
_shards:Object
total:2
successful:2
failed:0
_seq_no:21
_primary_term:1
@gbrian Could you help with this?
Hi @Mitrofanov , I see an error in the query caused by a known bug. I committed new version this morning. I recommend to update to the latest version first and try again your test. Please let me know if the error persists with the latest version. Thanks
@gbrian I just tried to use new version but with no luck. So my issue is:
- I added Timelion datasource (got error in validation but trying to work with it)
- I trying to get some data from my datasource- i executing .es(*) query (tested in Kibana's timelion- it has some data)
- When i try it in grafana i get no datapoints, although i don't see any errors in query inspector:
"xhrStatus": "complete",
"request": {
"method": "POST",
"url": "api/datasources/proxy/8/run",
"data": {
"sheet": [
",.es(*)"
],
"time": {
"from": "2018-05-15T05:28:37 +0300",
"interval": "auto",
"mode": "absolute",
"timezone": "GMT",
"to": "2018-05-15T11:28:37 +0300"
}
}
},
"response": {
"_index": "api",
"_type": "timelion",
"_id": "run",
"_version": 41,
"result": "updated",
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"_seq_no": 40,
"_primary_term": 1
}
}```
Could you please help?
@Mitrofanov I have to apologize, bug still there 😔
I'm checking code right now, I'll keep you posted. Sorry again and thanks for your patience
@Mitrofanov ,
I can not see this behavior with the latest version 🤔 please, remember to restart grafana after updating the plugin.
@gbrian Very strange. Just checked again- this bug seems fixed to me but no data on graph again. This is query inspector response:
{
"xhrStatus": "complete",
"request": {
"method": "POST",
"url": "api/datasources/proxy/8/run",
"data": {
"sheet": [
".es(*)"
],
"time": {
"from": "2018-05-15T15:59:17 +0300",
"interval": "auto",
"mode": "absolute",
"timezone": "GMT",
"to": "2018-05-15T21:59:17 +0300"
}
}
},
"response": {
"_index": "api",
"_type": "timelion",
"_id": "run",
"_version": 45,
"result": "updated",
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"_seq_no": 44,
"_primary_term": 1
}
}
Dammit! @Mitrofanov , Please post Chrome/Firefox Network view and check Preview tab you must see something like
@gbrian Here it is:
@Mitrofanov
😥 It seems to be posting to an ES index... check if an "api" index has been created on your ES.
Please be sure your Timelion's plugin setup is in the form of: http://192.168.182.186:5601/api/timelion
Take care: the port is the Kibana's port 5601 or your specific, do not point to ES port 9200 BTW please post the Headers section as well (removing sensitive data)
@gbrian Looks like this issues related to AWS ES setup. Let me explain:
In AWS ES service has a build-in kibana. All that stuff are available via single port (443), but uses different locations (/_plugin/kibana/app/kibana for kibana; / for ES). Also i don't nave api index in ES (as soon as nobody uses that). Here is my timelion config settings in Kibana (may be it would be helpful):
@Mitrofanov ok!
So, the best way to know which URL to use is to spy kibana's Timelion page:
Copy paste that url and fingers crossed there's no CORS restriction in place 😨
@gbrian Another round: i checked URI and it appears to be like follow: /_plugin/kibana/api/timelion/run
. But i get 404 if i run queries against it:
{
"xhrStatus": "complete",
"request": {
"method": "POST",
"url": "api/datasources/proxy/8/run",
"data": {
"sheet": [
".es(*)"
],
"time": {
"from": "2018-05-16T05:59:50 +0300",
"interval": "auto",
"mode": "absolute",
"timezone": "GMT",
"to": "2018-05-16T11:59:50 +0300"
}
}
},
"response": {
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
}
Could be it something not related to CORS, or in another case looks like it's our finish here.
Never surrender, CORS does not apply in proxy mode and i realized your using this mode :+1: Just try to reach the whole url from your browser: http://ec....amazon.../...//_plugin/kibana/api/timelion/run If its directly accesible will get some error back about the http method used Good luck
Ops. Wrong account above!
@gbrian Now i got 400 error on run
POST
@Mitrofanov ,
I set up an ES on amazon but need to know your configuration. (https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-ac.html) If it's open or you can share with me( temporary login) I'll be glad on checking and test myself, as I'm really curious about this issue.
BTW is grafana running on AWS as well? Thanks.
@gbrian So i can tell you my config: My ES running inside of VPC. Access control allows all from such VPC to access it:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "es:*",
"Resource": "arn:aws:es:*****:******:domain/*****-es6/*"
}
]
}
Grafana runs on ECS cluster in docker within the same VPC (so no connectivity issues here). Also we do have a lot of dashboards with ES datasource in this grafana, and they works well.
Just following up on this. Would be interested in a similar set up - AWS ES cluster running in a VPC with grafana hosted in the same VPC (probably not on ECS though).
Any luck getting the queries to run correctly or figuring out the networking issues?