Closed chiippy closed 8 years ago
Thanks! Fixed...
Even if running on OpenShift I'd recommend using the DNS name rather than the service name as this gets rid of service deployment dependencies. Kibana will retry connections to ES if it's not up when it's started, but service env vars won't exist if the ES service isn't created when the Kibana pod is created.
There'll be a new image available soon for 4.3.0 at fabric8/kibana4:v4.3.0_01
. & v4.4.0
as well but be aware that requires Elasticsearch 2.2.
Hi Jimmi Thanks for the quick fix. Just try, but this is still not working. I think you have missed "# " in the sed line. This is in the image
#!/bin/bash
if [[ -n "${ELASTICSEARCH_URL}" ]]; then
sed -i 's|^# elasticsearch\.url:.*$|elasticsearch.url: '"\"${ELASTICSEARCH_U
RL}\""'|' /opt/kibana4/config/kibana.yml
elif [[ -n "${ELASTICSEARCH_SERVICE_NAME}" ]]; then
SVC_HOST=${ELASTICSEARCH_SERVICE_NAME}_SERVICE_HOST
SVC_PORT=${ELASTICSEARCH_SERVICE_NAME}_SERVICE_PORT
sed -i 's|^elasticsearch\.url:.*$|elasticsearch.url: '"\"http://${!SVC_HOST}
:${!SVC_PORT}\""'|' /opt/kibana4/config/kibana.yml
fi
thanks.
Sorry! I'm actually on vacation so can't look at this for a couple of weeks. Happy to accept a PR to fix it. Would be grateful if @rawlingsj or @rhuss could help get this merged/fixed/tagged on docker hub?
@chiippy if you can put a PR together thats tested I can merge and include it in the next release (later today).
@chiippy @jimmidyson @rawlingsj sorry missed that. Hopefully I can have a look at it later today.
I'm back, albeit jetlagged! I can look now but thanks anyway @rhuss.
ok ;-). Good to know that the expert is back. welcome ;-)
"Expert"
Should be fixed now - tagging now
v4.3.0_02 & v4.4.0_01 (note ES 2.2.x only) will be available with this fix on Docker hub soon - build details at https://hub.docker.com/r/fabric8/kibana4/builds/.
Thanks Jimmi. This works nicely.
Glad to hear that - thanks for letting me know.
This has been changed if using the Docker run : sed -i 's|^# elasticsearch.url:.*$|elasticsearch.url: '"\"${ELASTICSEARCH_URL}\""'|' /opt/kibana4/config/kibana.yml
However, if using Kibana4 inside Openshift, then the sed line hasn't been modified :
In Kibana 4.3.0, the elasticsearch URL changed as