Do not wait cluster green status to import dashboards
The cluster can be red/yellow because of other non related indices, but this doesn't prevent to create the kibana-int index. Fixes-bug: #1540951 Change-Id: Ie2fef890f51abc061b3938bdb76cc84d054c6e0d
This commit is contained in:
parent
579a73467a
commit
75ee58450a
@ -32,8 +32,7 @@ define lma_logging_analytics::kibana_dashboard (
|
|||||||
$dashboard_source = encode_kibana_dashboard('guest', 'guest', $dashboard_title, $content)
|
$dashboard_source = encode_kibana_dashboard('guest', 'guest', $dashboard_title, $content)
|
||||||
|
|
||||||
exec { $title:
|
exec { $title:
|
||||||
onlyif => ["/usr/bin/curl -sL -w \"%{http_code}\\n\" -XGET ${es_url}/_cluster/health?wait_for_status=green | grep 200 > /dev/null",
|
onlyif => "/usr/bin/curl -sL -w \"%{http_code}\\n\" -XHEAD ${es_url}/kibana-int/dashboard/${dashboard_id} | grep 404 > /dev/null",
|
||||||
"/usr/bin/curl -sL -w \"%{http_code}\\n\" -XHEAD ${es_url}/kibana-int/dashboard/${dashboard_id} | grep 404 > /dev/null"],
|
|
||||||
command => "/usr/bin/curl -sL -w \"%{http_code}\\n\" -XPUT ${es_url}/kibana-int/dashboard/${dashboard_id} -d '${dashboard_source}' -o /dev/null | egrep \"(200|201)\" > /dev/null",
|
command => "/usr/bin/curl -sL -w \"%{http_code}\\n\" -XPUT ${es_url}/kibana-int/dashboard/${dashboard_id} -d '${dashboard_source}' -o /dev/null | egrep \"(200|201)\" > /dev/null",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user