Merge pull request elastic/elasticsearch#473 from simianhacker/upgrade-kibana
Upgrade kibana Original commit: elastic/x-pack-elasticsearch@3770f0fbb4
This commit is contained in:
commit
1a37d1d615
|
@ -1,5 +1,6 @@
|
|||
# WARNING THIS IS ALL IN FLUX
|
||||
|
||||
|
||||
# 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):
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
var _ = require('lodash');
|
||||
_.mixin(require('lodash-deep'));
|
||||
var moment = require('moment');
|
||||
var client = require('./client');
|
||||
|
||||
|
@ -19,9 +18,9 @@ module.exports = function (fixture) {
|
|||
|
||||
function createEntries(row) {
|
||||
var index = workingDate.format(indexPattern);
|
||||
var entry = { '@timestamp': workingDate.toISOString() };
|
||||
var entry = { 'timestamp': workingDate.toISOString() };
|
||||
row.forEach(function (val, index) {
|
||||
_.deepSet(entry, fields[index], val);
|
||||
_.set(entry, fields[index], val);
|
||||
});
|
||||
|
||||
indices.push(index);
|
||||
|
@ -40,7 +39,7 @@ module.exports = function (fixture) {
|
|||
var index = moment.utc(row[dateField]).format(indexPattern);
|
||||
var entry = {};
|
||||
_.each(row, function (val, key) {
|
||||
_.deepSet(entry, key, val);
|
||||
_.set(entry, key, val);
|
||||
});
|
||||
indices.push(index);
|
||||
body.push({
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = function testNoExecute(options, message, generateRawData) {
|
|||
var fixture = {
|
||||
indexPattern: options.indexPattern,
|
||||
type: options.type,
|
||||
dateField: '@timestamp',
|
||||
dateField: 'timestamp',
|
||||
rawData: rawData
|
||||
};
|
||||
return executeWatcher(options.watcher, fixture).then(function (resp) {
|
||||
|
|
|
@ -22,12 +22,12 @@ describe('Marvel Watchers', function () {
|
|||
this.timeout(5000);
|
||||
var workingDate = moment.utc();
|
||||
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 = {
|
||||
indexPattern: '[.marvel-]YYYY.MM.DD',
|
||||
type: 'cluster_stats',
|
||||
dateField: '@timestamp',
|
||||
dateField: 'timestamp',
|
||||
rawData: rawData
|
||||
};
|
||||
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 () {
|
||||
var workingDate = moment.utc();
|
||||
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 () {
|
||||
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
|
||||
return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
|
||||
}));
|
||||
return rawData;
|
||||
});
|
||||
|
@ -65,10 +65,10 @@ describe('Marvel Watchers', function () {
|
|||
testNoExecute('Red for 30 then Yellow for 60 seconds', function () {
|
||||
var workingDate = moment.utc();
|
||||
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 () {
|
||||
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
|
||||
return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
|
||||
}));
|
||||
return rawData;
|
||||
});
|
||||
|
@ -76,16 +76,16 @@ describe('Marvel Watchers', function () {
|
|||
testNoExecute('Red for 5 Yellow for 10 Red for 10 Green for 60', function () {
|
||||
var workingDate = moment.utc();
|
||||
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 () {
|
||||
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
|
||||
return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'yellow' };
|
||||
}));
|
||||
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 () {
|
||||
return { '@timestamp': workingDate.subtract(5, 's').format(), status: 'green' };
|
||||
return { 'timestamp': workingDate.subtract(5, 's').format(), status: 'green' };
|
||||
}));
|
||||
return rawData;
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"must": [
|
||||
{
|
||||
"range": {
|
||||
"@timestamp": {
|
||||
"timestamp": {
|
||||
"gte": "now-2m",
|
||||
"lte": "now"
|
||||
}
|
||||
|
@ -45,10 +45,10 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"fields": ["@timestamp","status"],
|
||||
"fields": ["timestamp","status"],
|
||||
"sort": [
|
||||
{
|
||||
"@timestamp": {
|
||||
"timestamp": {
|
||||
"order": "desc"
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
|||
"aggs": {
|
||||
"minutes": {
|
||||
"date_histogram": {
|
||||
"field": "@timestamp",
|
||||
"field": "timestamp",
|
||||
"interval": "5s"
|
||||
},
|
||||
"aggs": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"filtered": {
|
||||
"filter": {
|
||||
"range": {
|
||||
"@timestamp": {
|
||||
"timestamp": {
|
||||
"gte": "now-2m",
|
||||
"lte": "now"
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
|||
"aggs": {
|
||||
"minutes": {
|
||||
"date_histogram": {
|
||||
"field": "@timestamp",
|
||||
"field": "timestamp",
|
||||
"interval": "minute"
|
||||
},
|
||||
"aggs": {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"filtered": {
|
||||
"filter": {
|
||||
"range": {
|
||||
"@timestamp": {
|
||||
"timestamp": {
|
||||
"gte": "now-1m",
|
||||
"lte": "now"
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
|||
"aggs": {
|
||||
"minutes": {
|
||||
"date_histogram": {
|
||||
"field": "@timestamp",
|
||||
"field": "timestamp",
|
||||
"interval": "5s"
|
||||
},
|
||||
"aggs": {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"filtered": {
|
||||
"filter": {
|
||||
"range": {
|
||||
"@timestamp": {
|
||||
"timestamp": {
|
||||
"gte": "now-1m",
|
||||
"lte": "now"
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
|||
"aggs": {
|
||||
"minutes": {
|
||||
"date_histogram": {
|
||||
"field": "@timestamp",
|
||||
"field": "timestamp",
|
||||
"interval": "5s"
|
||||
},
|
||||
"aggs": {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"filtered": {
|
||||
"filter": {
|
||||
"range": {
|
||||
"@timestamp": {
|
||||
"timestamp": {
|
||||
"gte": "now-2m",
|
||||
"lte": "now"
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
|||
"aggs": {
|
||||
"minutes": {
|
||||
"date_histogram": {
|
||||
"field": "@timestamp",
|
||||
"field": "timestamp",
|
||||
"interval": "minute"
|
||||
},
|
||||
"aggs": {
|
||||
|
|
Loading…
Reference in New Issue