Skip to content

Instantly share code, notes, and snippets.

@megastef
Last active August 29, 2015 14:17
Show Gist options
  • Save megastef/135be23bc71f9443f0b1 to your computer and use it in GitHub Desktop.
Save megastef/135be23bc71f9443f0b1 to your computer and use it in GitHub Desktop.
Logsene + Kibana4 - local
echo $2 | htpasswd -i ./src/.htpasswd $1 $2
export LOGSENE_TOKEN=$1
export KIBANA_INDEX=${LOGSENE_TOKEN}_kibana
export KIBANA_ES_URL=https://logsene-receiver.sematext.com:443
curl -XPOST ${KIBANA_ES_URL}/${LOGSENE_TOKEN}_kibana
sed -ibak "s;^elasticsearch_url:.*;elasticsearch_url: \"${KIBANA_ES_URL}\";" ./config/kibana.yml
sed -ibak "s;^kibana_index:.*;kibana_index: \"${LOGSENE_TOKEN}_kibana\";" ./config/kibana.yml
echo Please use following index pattern in Kibana 4: [${LOGSENE_TOKEN}_]YYYY-MM-DD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment