Strange Error when loading Kibana Visualizations

I am using a shell script to put visualizations and dashboards into kibana. This is the script I am using, I'm pretty confident that it works:

#!/bin/sh

# This script populates ElasticSearch .kibana index with pre-defined
# visualizations and dashboard.
#
# Note that the json file name (e.g. 5.0.0-alpha5.json) under config/ directory
# needs to match up with kibana version

ES=$1

TYPES="config index-pattern visualization dashboard"

for _type in ${TYPES}; do
    for _item in ${_type}/*.json; do
        _id=`basename ${_item} .json`
        echo curl -d @"${_item}" "http://${ES}:9200/.kibana/${_type}/${_id}"
        curl -d @"${_item}" "http://${ES}:9200/.kibana/${_type}/${_id}"
    done
done

When I run this script it does not give me any errors, but when I open Kibana and go to the visualizations tab, I get redirected to the Management tab and get the following error:

"Saved Visualization Service: Visualization type is missing. Please add a type to this visualization."

I would appreciate any help with resolving this error. (I am using version 5.2) Thx.

Usually this is due to the json being mangled in some way. A good way to troubleshoot this might be to create the visualization manually through the UI, export that JSON through the management / saved objects area, and then compare it against your script generated json.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.