One possible workaround might be:
- Get the
index-pattern
using its title or the ID
# Search by index-pattern title
GET .kibana/_search
{
"query": {
"bool": {
"filter": [
{
"term": {
"type": {
"value": "index-pattern"
}
}
},
{
"term": {
"index-pattern.title": {
"value": "kibana_sample_data_logs"
}
}
}
]
}
}
}
# Or if you know the ID
GET .kibana/_doc/index-pattern:90943e30-9a47-11e8-b64d-95841ca0b247
-
Get the content of the field
fieldFormatMap
.
E.g."fieldFormatMap": """{"url.keyword":{"id":"url","params":{"parsedUrl":{"origin":"https://localhost:9243","pathname":"/app/kibana","basePath":""},"urlTemplate":"/some/pathname/asset.png"}},"url":{"id":"url","params":{"parsedUrl":{"origin":"https://localhost:9243","pathname":"/app/kibana","basePath":""},"urlTemplate":"/some/pathname/asset.png"}}}"""
-
Get the
_id
of theindex-pattern
.
E.g.index-pattern:90943e30-9a47-11e8-b64d-95841ca0b247
-
Modify the content of the
fieldFormatMap
to replace the URL of your local environment with the correct one -
Execute a partial update.
E.g.
POST .kibana/_update/index-pattern:90943e30-9a47-11e8-b64d-95841ca0b247
{
"doc": {
"index-pattern": {
"fieldFormatMap": """{"url.keyword":{"id":"url","params":{"parsedUrl":{"origin":"https://yourdevenv:5601","pathname":"/app/kibana","basePath":""},"urlTemplate":"/some/pathname/asset.png"}},"url":{"id":"url","params":{"parsedUrl":{"origin":"yourdevenv:5601","pathname":"/app/kibana","basePath":""},"urlTemplate":"/some/pathname/asset.png"}}}"""
}
}
}
All those requests can be done using bash
, curl
and sed
and automated in a script.
I've opened the following for reference: