Bonjour !
Actuellement, j'ai créé des dashboards et visualisations via Kibana.
A des fins de scripting, je souhaiterai réimporter ces dashboards et visualisations à partir de mon petit script.
Comment puis-je le faire svp ?
Pour info (quelques exemples)
GET .kibana/visualization/_search
"hits": {
"total": 7,
"max_score": 1,
"hits": [
{
"_index": ".kibana",
"_type": "visualization",
"_id": "Mod_security_audit:-Répartition-événements-par-type-de-méthode-HTTP-en-fonction-du-temps",
"_score": 1,
"_source": {
"title": "Mod_security_audit: Répartition événements par type de méthode HTTP en fonction du temps",
"visState": "{\"title\":\"New Visualization\",\"type\":\"histogram\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"scale\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"event_timestamp\"}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"httpMethod.raw\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}",
"uiStateJSON": "{}",
"description": "",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"logstash_mod_security_alert-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
}
}
},
GET .kibana/dashboard/_search
"hits": {
"total": 2,
"max_score": 1,
"hits": [
{
"_index": ".kibana",
"_type": "dashboard",
"_id": "Mod_security_alert",
"_score": 1,
"_source": {
"title": "Mod_security_alert",
"hits": 0,
"description": "",
"panelsJSON": "[{\"id\":\"Mod_security_alert:-Alertes-relevées-(détail)\",\"type\":\"visualization\",\"panelIndex\":1,\"size_x\":12,\"size_y\":3,\"col\":1,\"row\":3},{\"id\":\"Mod_security_alert:-Répartition-par-type-de-sévérité\",\"type\":\"visualization\",\"panelIndex\":2,\"size_x\":3,\"size_y\":2,\"col\":10,\"row\":1},{\"id\":\"Mod_security_alert:-Répartition-par-type-de-sévérité-dans-le-temps\",\"type\":\"visualization\",\"panelIndex\":3,\"size_x\":9,\"size_y\":2,\"col\":1,\"row\":1}]",
"optionsJSON": "{\"darkTheme\":false}",
"uiStateJSON": "{}",
"version": 1,
"timeRestore": false,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}}}]}"
}
}
},