punchplatform-setup-kibana.sh¶
Synopsis¶
punchplatform-setup-kibana.sh [--import|--export] [options]
Description¶
Manage dashboards, visualization, searches, index-patterns and config for various Kibana instances.
Command¶
-
-h | --help
:- Print the help menu.
-
-l | --url <url>
:- Elasticsearch URL ('localhost:9200' by default).
-
-u | --user <name>
:- Authenticate to Elasticsearch using Basic auth. The username and password should be separated by a colon (i.e. "admin:secret"). By default no username and password are used.
-
-k | --kibana-index <name>
:- Kibana index pattern where to save the dashboards, visualizations, index patterns ('.kibana' by default).
-
-i | --import
:- Import: imports each json file from Kibana resources directories to an Elasticsearch instance.
-
-x | --export
:- Export: Generate a json output containing all objects matching a given pattern (e.g. 'metricbeat'). If no pattern set, exports everything by default.
-
-o | --output <name>
:- The name given to the export output file.
-
-p | --pattern <pattern>
:- Export/import Kibana objects based on a pattern. An object is selected if its title contains this pattern (case sensitive).
-
--export-index <pattern>
:- Add an index pattern to the current export. Selected if it contains this pattern (case sensitive).
-
--with-config
:- Add Kibana configuration to the current export. Useful to export Kibana default\'s index pattern. Corresponds to '.kibana/config/_search'
-
--debug
:- Debug mode: outputs elasticsearch urls calls and the generated json.
Examples¶
Import every resources into Kibana
1 | $ punchplatform-setup-kibana.sh --import |
Import all objects with a title containing "top-"
1 | $ punchplatform-setup-kibana.sh -i -p "top-"
|
Export all existing Kibana objects
1 | $ punchplatform-setup-kibana.sh -x --export-index "*" --with-config
|
Save your export to a file '[kibana]/bulk/myfile.json'
1 | $ punchplatform-setup-kibana.sh -x -p "metricbeat" -o "myfile" |
Define another elasticsearch address, user or kibana index
1 | $ punchplatform-setup-kibana.sh -l "http://example:9200" -u admin:secret -k ".new-kibana" |
Debug an export
1 | $ punchplatform-setup-kibana.sh -x --debug |