Last active
December 25, 2015 21:39
-
-
Save dirn/7044506 to your computer and use it in GitHub Desktop.
Kibana Vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| apt-get update > /dev/null | |
| apt-get install curl vim -y > /dev/null | |
| apt-get install nginx -y > /dev/null | |
| apt-get install openjdk-7-jre-headless -y > /dev/null | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.deb | |
| dpkg -i elasticsearch-0.90.5.deb | |
| service elasticsearch start | |
| ln -s /vagrant/nginx.conf /etc/nginx/sites-enabled/kibana; | |
| service nginx start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * These is the app's configuration, If you need to configure | |
| * the default dashboard, please see dashboards/default | |
| */ | |
| define(['settings'], | |
| function (Settings) { | |
| return new Settings({ | |
| /** | |
| * URL to your elasticsearch server. You almost certainly don't | |
| * want 'http://localhost:9200' here. Even if Kibana and ES are on | |
| * the same host | |
| * | |
| * By default this will attempt to reach ES at the same host you have | |
| * elasticsearch installed on. You probably want to set it to the FQDN of your | |
| * elasticsearch host | |
| * @type {String} | |
| */ | |
| elasticsearch: "http://"+window.location.hostname+":8000", | |
| /** | |
| * The default ES index to use for storing Kibana specific object | |
| * such as stored dashboards | |
| * @type {String} | |
| */ | |
| kibana_index: "kibana-int", | |
| /** | |
| * Panel modules available. Panels will only be loaded when they are defined in the | |
| * dashboard, but this list is used in the "add panel" interface. | |
| * @type {Array} | |
| */ | |
| panel_names: [ | |
| 'histogram', | |
| 'map', | |
| 'pie', | |
| 'table', | |
| 'filtering', | |
| 'timepicker', | |
| 'text', | |
| 'fields', | |
| 'hits', | |
| 'dashcontrol', | |
| 'column', | |
| 'derivequeries', | |
| 'trends', | |
| 'bettermap', | |
| 'query', | |
| 'terms' | |
| ] | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Nginx proxy for Elasticsearch + Kibana | |
| # | |
| # In this setup, we are password protecting the saving of dashboards. You may | |
| # wish to extend the password protection to all paths. | |
| # | |
| # Even though these paths are being called as the result of an ajax request, the | |
| # browser will prompt for a username/password on the first request | |
| # | |
| # If you use this, you'll want to point config.js at http://FQDN:80/ instead of | |
| # http://FQDN:9200 | |
| # | |
| server { | |
| listen *:80 ; | |
| server_name kibana; | |
| access_log /var/log/nginx/kibana.log; | |
| location / { | |
| root /vagrant; | |
| index index.html index.htm; | |
| } | |
| location ~ ^/_aliases$ { | |
| proxy_pass http://127.0.0.1:9200; | |
| proxy_read_timeout 90; | |
| } | |
| location ~ ^/_nodes$ { | |
| proxy_pass http://127.0.0.1:9200; | |
| proxy_read_timeout 90; | |
| } | |
| location ~ ^/.*/_search$ { | |
| proxy_pass http://127.0.0.1:9200; | |
| proxy_read_timeout 90; | |
| } | |
| location ~ ^/.*/_mapping$ { | |
| proxy_pass http://127.0.0.1:9200; | |
| proxy_read_timeout 90; | |
| } | |
| # Password protected end points | |
| location ~ ^/kibana-int/dashboard/.*$ { | |
| proxy_pass http://127.0.0.1:9200; | |
| proxy_read_timeout 90; | |
| } | |
| location ~ ^/kibana-int/temp.*$ { | |
| proxy_pass http://127.0.0.1:9200; | |
| proxy_read_timeout 90; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "precise64" | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| config.vm.provision :shell, :path => "bootstrap.sh" | |
| config.vm.network :forwarded_port, host: 8000, guest: 80 | |
| config.vm.network :forwarded_port, host: 9000, guest: 9200 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment