Separate template mapping for log and notification
This patch removes also the 'fuel_environment' field which is never used. Change-Id: I8af0e8186a558dbea2442d0cca434166025677b1
This commit is contained in:
parent
ef8a34c886
commit
4b0458b3fc
|
@ -22,7 +22,7 @@ define lma_logging_analytics::es_template (
|
|||
$index_prefix = $title
|
||||
|
||||
elasticsearch::template { $title:
|
||||
content => template('lma_logging_analytics/es_template.json.erb'),
|
||||
content => template("lma_logging_analytics/es_template_${title}.json.erb"),
|
||||
host => $host,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'lma_logging_analytics::es_template' do
|
||||
let(:title) { 'foo' }
|
||||
let(:title) { 'log' }
|
||||
let(:facts) do
|
||||
{:kernel => 'Linux', :operatingsystem => 'Ubuntu',
|
||||
:concat_basedir => '/foo'}
|
||||
end
|
||||
|
||||
describe 'with defaults' do
|
||||
it { is_expected.to contain_elasticsearch__template('foo') }
|
||||
it { is_expected.to contain_elasticsearch__template('log') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,14 +6,6 @@
|
|||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"programname": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"python_module": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"Hostname": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
|
@ -26,19 +18,20 @@
|
|||
"index": "not_analyzed",
|
||||
"type": "long"
|
||||
},
|
||||
"syslogfacility": {
|
||||
"index": "not_analyzed",
|
||||
"type": "long"
|
||||
},
|
||||
"Type": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"python_module": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"severity_label": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"fuel_environment": {
|
||||
|
||||
"environment_label": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -54,10 +47,6 @@
|
|||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"deployment_mode": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"request_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
|
@ -69,6 +58,10 @@
|
|||
"user_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"instance_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"mappings": {
|
||||
"message": {
|
||||
"properties": {
|
||||
"event_type": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"Payload": {
|
||||
"type": "string"
|
||||
},
|
||||
"Logger": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"programname": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"Hostname": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"hostname": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"Pid": {
|
||||
"index": "not_analyzed",
|
||||
"type": "long"
|
||||
},
|
||||
"Severity": {
|
||||
"index": "not_analyzed",
|
||||
"type": "long"
|
||||
},
|
||||
"syslogfacility": {
|
||||
"index": "not_analyzed",
|
||||
"type": "long"
|
||||
},
|
||||
"Type": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"severity_label": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"environment_label": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"openstack_region": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"openstack_release": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"deployment_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"request_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"tenant_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"index": "not_analyzed",
|
||||
"type": "string"
|
||||
},
|
||||
"launched_at": {
|
||||
"type": "date",
|
||||
"format": "dateOptionalTime"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "date",
|
||||
"format": "dateOptionalTime"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"number_of_shards": <%= @number_of_shards %>,
|
||||
"number_of_replicas": <%= @number_of_replicas %>
|
||||
},
|
||||
"template": "<%= @index_prefix %>-*"
|
||||
}
|
|
@ -283,7 +283,7 @@
|
|||
"old_task_state",
|
||||
"state",
|
||||
"new_task_state",
|
||||
"fuel_environment"
|
||||
"environment_label"
|
||||
],
|
||||
"highlight": [],
|
||||
"sortable": true,
|
||||
|
|
Loading…
Reference in New Issue