In elastic exist index
gitlab-ci-store
create POST
PUT gitlab-ci-store
{
"mappings": {
"properties": {
"gitlab-ci-store": {
"properties": {
"project_root": { "type": "keyword"},
"project_name": { "type": "keyword"},
"template_name": { "type": "keyword"},
"template_version": { "type": "keyword"},
"template_filename": { "type": "keyword"},
"job_id": { "type": "integer"},
"timestamp": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}
}
}
}
query for search returns same result
GET gitlab-ci-store/_search
{
"query": {
"match": {
"gitlab-ci-store.project_root": "smart_projects"
}
}
}
POST gitlab-ci-store/_search
{
"query": {
"term": {
"gitlab-ci-store.project_root": "smart_projects"
}
}
}
{
"_index" : "gitlab-ci-store",
"_type" : "_doc",
"_id" : "jCbZ74MBsDU1MHfZqecN",
"_score" : 0.13353139,
"_source" : {
"@timestamp" : "2022-10-19T10:46:02.764855Z",
"gitlab-ci-store" : {
"template_name" : "docker",
"template_version" : "v6",
"job_id" : 7320985,
"project_root" : "smart_projects",
"template_filename" : "base_docker_build",
"project_name" : "feeds_links_kafka_listner",
"timestamp" : "2022-10-19 01:00:00"
}
}
},
{
"_index" : "gitlab-ci-store",
"_type" : "_doc",
"_id" : "CCfZ74MBsDU1MHfZ6gOU",
"_score" : 0.13353139,
"_source" : {
"@timestamp" : "2022-10-19T10:46:19.539666Z",
"gitlab-ci-store" : {
"template_name" : "docker",
"template_version" : "v6",
"job_id" : 7320989,
"project_root" : "smart_projects",
"template_filename" : "base_docker_build",
"project_name" : "bestsellers_uploader",
"timestamp" : "2022-10-19 02:00:00"
}
}
after I connect datasource Elastic in Grafana
after create dashboard and add Variables, for check how work Datasource in Query option add
{"find": "fields", "type": "keyword"}
Preview of values returned norm result.
After add Query for returned values of gitlab-ci-store.project_name write
{"find": "terms", "field": "gitlab-ci-store.project_name", "size": 1000}
returned None
try else
{"find": "terms", "field": "gitlab-ci-store.project_name.string", "size": 1000}
{"find": "terms", "field": "gitlab-ci-store.project_name.keyword", "size": 1000}
{"find": "terms", "field": "gitlab-ci-store.project_name.text", "size": 1000}
same returned None
Why Grafana Variables query from data source ElasticSearch returned None?