Skip to content

Commit 3339d53

Browse files
committed
Initial commit
0 parents  commit 3339d53

File tree

6 files changed

+140
-0
lines changed

6 files changed

+140
-0
lines changed

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM nginx:1.7
2+
MAINTAINER Mathieu Rochette "[email protected]"
3+
4+
EXPOSE 80
5+
6+
CMD ["/usr/local/bin/kibana"]
7+
8+
ADD kibana-3.1.0.tar.gz /opt/local/kibana/
9+
ADD app /

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Kibana
2+
3+
Kibana container version 3.1.0 for Docker
4+
5+
## Usage
6+
7+
`docker run -e ES_HOST=elasticsearch.tld -p 80:80 texthtml/kibana`
8+
9+
## Configuration
10+
11+
Kibana default `config.js` can be configured with env vars:
12+
13+
* ES_SCHEME : defaults to http
14+
* ES_HOST : recommended, defaults to `window.location.hostname`
15+
* ES_PORT : defaults to 9200
16+
17+
If you want to provide your own config file,
18+
If you want to provide your own configuration, just mount it on `/opt/logstash.conf`:
19+
20+
`docker run -v config/kibana.js:/opt/local/kibana/config.js -p 80:80 texthtml/kibana`
21+
22+
`/opt/local/kibana/config.js` is a template file. You can use `$ES_SCHEME`, `$ES_HOST`, `$ES_PORT` or any other env var you want and it will be replaced with its value.

app/etc/nginx/conf.d/default.conf

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
server {
2+
listen 80;
3+
server_name localhost;
4+
5+
location / {
6+
root /opt/local/kibana/kibana-3.1.0/;
7+
index index.html index.htm;
8+
}
9+
10+
#error_page 404 /404.html;
11+
12+
# redirect server error pages to the static page /50x.html
13+
#
14+
error_page 500 502 503 504 /50x.html;
15+
location = /50x.html {
16+
root /usr/share/nginx/html;
17+
}
18+
}
19+

app/opt/local/kibana/config.js.tpl

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/** @scratch /configuration/config.js/1
2+
*
3+
* == Configuration
4+
* config.js is where you will find the core Kibana configuration. This file contains parameter that
5+
* must be set before kibana is run for the first time.
6+
*/
7+
define(['settings'],
8+
function (Settings) {
9+
10+
11+
/** @scratch /configuration/config.js/2
12+
*
13+
* === Parameters
14+
*/
15+
return new Settings({
16+
17+
/** @scratch /configuration/config.js/5
18+
*
19+
* ==== elasticsearch
20+
*
21+
* The URL to your elasticsearch server. You almost certainly don't
22+
* want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on
23+
* the same host. By default this will attempt to reach ES at the same host you have
24+
* kibana installed on. You probably want to set it to the FQDN of your
25+
* elasticsearch host
26+
*
27+
* Note: this can also be an object if you want to pass options to the http client. For example:
28+
*
29+
* +elasticsearch: {server: "http://localhost:9200", withCredentials: true}+
30+
*
31+
*/
32+
elasticsearch: "$ES_SCHEME://$ES_HOST:$ES_PORT",
33+
34+
/** @scratch /configuration/config.js/5
35+
*
36+
* ==== default_route
37+
*
38+
* This is the default landing page when you don't specify a dashboard to load. You can specify
39+
* files, scripts or saved dashboards here. For example, if you had saved a dashboard called
40+
* `WebLogs' to elasticsearch you might use:
41+
*
42+
* default_route: '/dashboard/elasticsearch/WebLogs',
43+
*/
44+
default_route : '/dashboard/file/default.json',
45+
46+
/** @scratch /configuration/config.js/5
47+
*
48+
* ==== kibana-int
49+
*
50+
* The default ES index to use for storing Kibana specific object
51+
* such as stored dashboards
52+
*/
53+
kibana_index: "kibana-int",
54+
55+
/** @scratch /configuration/config.js/5
56+
*
57+
* ==== panel_name
58+
*
59+
* An array of panel modules available. Panels will only be loaded when they are defined in the
60+
* dashboard, but this list is used in the "add panel" interface.
61+
*/
62+
panel_names: [
63+
'histogram',
64+
'map',
65+
'goal',
66+
'table',
67+
'filtering',
68+
'timepicker',
69+
'text',
70+
'hits',
71+
'column',
72+
'trends',
73+
'bettermap',
74+
'query',
75+
'terms',
76+
'stats',
77+
'sparklines'
78+
]
79+
});
80+
});

app/usr/local/bin/kibana

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
ES_HOST=${ES_HOST:-\"+window.location.hostname+\"}
3+
ES_PORT=${ES_PORT:-9200}
4+
ES_SCHEME=${ES_SCHEME:-http}
5+
6+
cat /opt/local/kibana/config.js.tpl | \
7+
sed "s/\$ES_HOST/$ES_HOST/;s/\$ES_SCHEME/$ES_SCHEME/;s/\$ES_PORT/$ES_PORT/" \
8+
> /opt/local/kibana/kibana-3.1.0/config.js
9+
10+
nginx -c /etc/nginx/nginx.conf -g 'daemon off;'

kibana-3.1.0.tar.gz

1.02 MB
Binary file not shown.

0 commit comments

Comments
 (0)