Merge pull request elastic/elasticsearch#473 from simianhacker/upgrade-kibana

Upgrade kibana

Original commit: elastic/x-pack-elasticsearch@3770f0fbb4
This commit is contained in:
Chris Cowan 2015-08-10 13:18:19 -07:00
commit 1a37d1d615
12 changed files with 156 additions and 32 deletions

View File

@ -1,4 +1,3 @@
public
agent agent
node_modules node_modules
bower_components bower_components

View File

@ -1,4 +0,0 @@
{
"directory": "./public/bower_components"
}

View File

@ -1,5 +1,6 @@
# WARNING THIS IS ALL IN FLUX # WARNING THIS IS ALL IN FLUX
# Installing the last release of Marvel # Installing the last release of Marvel
The easiest way to play/get to know Marvel is to install the latest release version of it. To do so, just run the following command on every node on your cluster (restart node for it to have effect): The easiest way to play/get to know Marvel is to install the latest release version of it. To do so, just run the following command on every node on your cluster (restart node for it to have effect):

129
marvel_index_template.json Normal file
View File

@ -0,0 +1,129 @@
{
"template": ".marvel*",
"settings": {
"marvel.index_format": 7,
"marvel.version": "2.0.0",
"index.number_of_shards": 1,
"index.number_of_replicas": 1,
"index.codec": "best_compression",
"index.mapper.dynamic": false
},
"mappings": {
"_default_": {
"_all": {
"enabled": false
},
"date_detection": false,
"properties": {
"cluster_name": {
"type": "string",
"index": "not_analyzed"
},
"timestamp": {
"type": "date",
"format": "date_time"
}
}
},
"marvel_index_stats": {
"properties": {
"index_stats": {
"properties": {
"index": {
"type": "string",
"index": "not_analyzed"
},
"total": {
"properties": {
"docs": {
"properties": {
"count": {
"type": "long"
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long"
},
"throttle_time_in_millis": {
"type": "long"
}
}
},
"indexing": {
"properties": {
"throttle_time_in_millis": {
"type": "long"
}
}
}
}
}
}
}
}
},
"marvel_cluster_stats": {
"properties": {
"cluster_stats": {
"properties": {
"nodes": {
"type": "object"
},
"indices": {
"type": "object"
}
}
}
}
},
"marvel_cluster_state": {
"properties": {
"cluster_state": {
"properties": {
"version": { "type": "long" },
"nodes": { "type": "object" },
"master_node": { "type": "string", "index": "not_analyzed" },
"shards": { "type": "object" }
}
}
}
},
"marvel_node_stats": {
"properties": {
"node_id": {
"type": "string",
"index": "not_analyzed"
},
"node_master": {
"type": "boolean"
},
"mlockall": {
"type": "boolean"
},
"disk_threshold_enabled": {
"type": "boolean"
},
"disk_threshold_watermark_high": {
"type": "short"
},
"node_stats": {
"type": "object"
}
}
},
"marvel_index_recovery": {
"properties": {
"index_name": {
"type": "string",
"index": "not_analyzed"
},
"shards": {
"type": "object"
}
}
}
}
}

View File

@ -1,5 +1,4 @@
var _ = require('lodash'); var _ = require('lodash');
_.mixin(require('lodash-deep'));
var moment = require('moment'); var moment = require('moment');
var client = require('./client'); var client = require('./client');
@ -19,9 +18,9 @@ module.exports = function (fixture) {
function createEntries(row) { function createEntries(row) {
var index = workingDate.format(indexPattern); var index = workingDate.format(indexPattern);
var entry = { '@timestamp': workingDate.toISOString() }; var entry = { 'timestamp': workingDate.toISOString() };
row.forEach(function (val, index) { row.forEach(function (val, index) {
_.deepSet(entry, fields[index], val); _.set(entry, fields[index], val);
}); });
indices.push(index); indices.push(index);
@ -40,7 +39,7 @@ module.exports = function (fixture) {
var index = moment.utc(row[dateField]).format(indexPattern); var index = moment.utc(row[dateField]).format(indexPattern);
var entry = {}; var entry = {};
_.each(row, function (val, key) { _.each(row, function (val, key) {
_.deepSet(entry, key, val); _.set(entry, key, val);
}); });
indices.push(index); indices.push(index);
body.push({ body.push({

View File

@ -10,7 +10,7 @@ module.exports = function testNoExecute(options, message, generateRawData) {
var fixture = { var fixture = {
indexPattern: options.indexPattern, indexPattern: options.indexPattern,
type: options.type, type: options.type,
dateField: '@timestamp', dateField: 'timestamp',
rawData: rawData rawData: rawData
}; };
return executeWatcher(options.watcher, fixture).then(function (resp) { return executeWatcher(options.watcher, fixture).then(function (resp) {

View File

@ -22,12 +22,12 @@ describe('Marvel Watchers', function () {
this.timeout(5000); this.timeout(5000);
var workingDate = moment.utc(); var workingDate = moment.utc();
var rawData = _.times(12, function () { var rawData = _.times(12, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'red' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'red' };
}); });
var fixture = { var fixture = {
indexPattern: '[.marvel-]YYYY.MM.DD', indexPattern: '[.marvel-]YYYY.MM.DD',
type: 'cluster_stats', type: 'cluster_stats',
dateField: '@timestamp', dateField: 'timestamp',
rawData: rawData rawData: rawData
}; };
return executeWatcher('cluster_status', fixture).then(function (resp) { return executeWatcher('cluster_status', fixture).then(function (resp) {
@ -54,10 +54,10 @@ describe('Marvel Watchers', function () {
testNoExecute('Red for 55 then Yellow for 60 seconds', function () { testNoExecute('Red for 55 then Yellow for 60 seconds', function () {
var workingDate = moment.utc(); var workingDate = moment.utc();
var rawData = _.times(11, function () { var rawData = _.times(11, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'red' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'red' };
}); });
rawData.concat(_.times(12, function () { rawData.concat(_.times(12, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
})); }));
return rawData; return rawData;
}); });
@ -65,10 +65,10 @@ describe('Marvel Watchers', function () {
testNoExecute('Red for 30 then Yellow for 60 seconds', function () { testNoExecute('Red for 30 then Yellow for 60 seconds', function () {
var workingDate = moment.utc(); var workingDate = moment.utc();
var rawData = _.times(6, function () { var rawData = _.times(6, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'red' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'red' };
}); });
rawData.concat(_.times(12, function () { rawData.concat(_.times(12, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
})); }));
return rawData; return rawData;
}); });
@ -76,16 +76,16 @@ describe('Marvel Watchers', function () {
testNoExecute('Red for 5 Yellow for 10 Red for 10 Green for 60', function () { testNoExecute('Red for 5 Yellow for 10 Red for 10 Green for 60', function () {
var workingDate = moment.utc(); var workingDate = moment.utc();
var rawData = _.times(1, function () { var rawData = _.times(1, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'red' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'red' };
}); });
rawData.concat(_.times(2, function () { rawData.concat(_.times(2, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
})); }));
rawData.concat(_.times(2, function () { rawData.concat(_.times(2, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'red' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'red' };
})); }));
rawData.concat(_.times(12, function () { rawData.concat(_.times(12, function () {
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'green' }; return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'green' };
})); }));
return rawData; return rawData;
}); });

View File

@ -17,7 +17,7 @@
"must": [ "must": [
{ {
"range": { "range": {
"@timestamp": { "timestamp": {
"gte": "now-2m", "gte": "now-2m",
"lte": "now" "lte": "now"
} }
@ -45,10 +45,10 @@
} }
} }
}, },
"fields": ["@timestamp","status"], "fields": ["timestamp","status"],
"sort": [ "sort": [
{ {
"@timestamp": { "timestamp": {
"order": "desc" "order": "desc"
} }
} }
@ -57,7 +57,7 @@
"aggs": { "aggs": {
"minutes": { "minutes": {
"date_histogram": { "date_histogram": {
"field": "@timestamp", "field": "timestamp",
"interval": "5s" "interval": "5s"
}, },
"aggs": { "aggs": {

View File

@ -16,7 +16,7 @@
"filtered": { "filtered": {
"filter": { "filter": {
"range": { "range": {
"@timestamp": { "timestamp": {
"gte": "now-2m", "gte": "now-2m",
"lte": "now" "lte": "now"
} }
@ -27,7 +27,7 @@
"aggs": { "aggs": {
"minutes": { "minutes": {
"date_histogram": { "date_histogram": {
"field": "@timestamp", "field": "timestamp",
"interval": "minute" "interval": "minute"
}, },
"aggs": { "aggs": {

View File

@ -21,7 +21,7 @@
"filtered": { "filtered": {
"filter": { "filter": {
"range": { "range": {
"@timestamp": { "timestamp": {
"gte": "now-1m", "gte": "now-1m",
"lte": "now" "lte": "now"
} }
@ -32,7 +32,7 @@
"aggs": { "aggs": {
"minutes": { "minutes": {
"date_histogram": { "date_histogram": {
"field": "@timestamp", "field": "timestamp",
"interval": "5s" "interval": "5s"
}, },
"aggs": { "aggs": {

View File

@ -21,7 +21,7 @@
"filtered": { "filtered": {
"filter": { "filter": {
"range": { "range": {
"@timestamp": { "timestamp": {
"gte": "now-1m", "gte": "now-1m",
"lte": "now" "lte": "now"
} }
@ -32,7 +32,7 @@
"aggs": { "aggs": {
"minutes": { "minutes": {
"date_histogram": { "date_histogram": {
"field": "@timestamp", "field": "timestamp",
"interval": "5s" "interval": "5s"
}, },
"aggs": { "aggs": {

View File

@ -16,7 +16,7 @@
"filtered": { "filtered": {
"filter": { "filter": {
"range": { "range": {
"@timestamp": { "timestamp": {
"gte": "now-2m", "gte": "now-2m",
"lte": "now" "lte": "now"
} }
@ -27,7 +27,7 @@
"aggs": { "aggs": {
"minutes": { "minutes": {
"date_histogram": { "date_histogram": {
"field": "@timestamp", "field": "timestamp",
"interval": "minute" "interval": "minute"
}, },
"aggs": { "aggs": {