blob: fb86e2323a3ad53ce2b9dee23537233511eadd2c [file] [log] [blame]
Zack Williamsa7b3e4c2018-08-14 15:12:49 -07001---
2# Copyright 2018--present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# Values file for SEBA log aggregation infra
17# NOTE: must start this chart with the name "logging":
18# helm install -n logging logging
19# ortherwise the elasticsearch hostname won't work properly in the other containers
20
21# elasticstack config
22# ref: https://github.com/helm/charts/tree/master/incubator/elasticsearch
23elasticsearch:
24 client:
25 serviceType: "NodePort"
26 master:
27 persistence:
28 storageClass: "local-ssd"
29 size: "5Gi"
30 data:
31 persistence:
32 storageClass: "local-hdd"
33 size: "10Gi"
34
35# kibana config
36# ref: https://github.com/helm/charts/tree/master/stable/kibana
37kibana:
38 enabled: true
39# dashboardImport:
40# dashboards: |-
41#
42 service:
43 type: "NodePort"
44 nodePort: 30601
45 env:
46 ELASTICSEARCH_URL: "http://logging-elasticsearch-client:9200"
47
Zack Williams7a506d22018-09-24 17:00:13 -070048 dashboardImport:
49 dashboards:
50 1_create_index: |-
51 {
52 "version": "6.4.2",
53 "objects": [
54 {
55 "id": "749ea2f0-d15c-11e8-b4aa-8f5499fd5eba",
56 "type": "index-pattern",
57 "version": 2,
58 "attributes": {
59 "title": "logstash-*",
60 "timeFieldName": "@timestamp",
61 "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"bundle.id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"bundle.id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bundle.name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"bundle.name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bundle.version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"bundle.version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"category\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"category.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"error.message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"error.type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"detail\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"geoip.ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geoip.latitude\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geoip.location\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geoip.longitude\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"input.type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"input.type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka_key\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"kafka_key.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka_timestamp\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"kafka_timestamp.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka_topic\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"kafka_topic.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"levelname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"levelname.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"levelno\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"lineno\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"offset\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"msg.model\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"msg.version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"thread\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"threadName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]"
62 }
63 }
64 ]
65 }
66
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070067# logstash config
68# ref: https://github.com/helm/charts/tree/master/incubator/logstash
69logstash:
70 enabled: true
71 elasticsearch:
72 host: "logging-elasticsearch-client"
73
74 # we have kafka, so persistence isn't needed
75 # ref: https://www.elastic.co/guide/en/logstash/current/persistent-queues.html
76 persistence:
77 enabled: false
78
Zack Williams11255982018-08-27 14:22:55 -070079 # Probe default delays are too short, which puts logstash into a reboot loop
80 livenessProbe:
81 initialDelaySeconds: 120
82
83 readinessProbe:
84 initialDelaySeconds: 120
85
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070086 # 'config' k/v are turned into env vars for logstash container
87 # ref: https://www.elastic.co/guide/en/logstash/current/docker-config.html#docker-env-config
88 # config:
89 # LOG_LEVEL: trace
90
91 # Kafka input plugin
92 # ref: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html
93 inputs:
94 main: |-
95 input {
96 kafka {
Zack Williams7a506d22018-09-24 17:00:13 -070097 auto_offset_reset => "earliest" # get all previous items from new topics
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070098 bootstrap_servers => "cord-kafka:9092"
99 client_id => "logstash_ck"
100 codec => json { charset => "UTF-8" }
101 consumer_threads => 1
102 decorate_events => true
Zack Williams7a506d22018-09-24 17:00:13 -0700103 group_id => "logstash_ck"
Zack Williamsa7b3e4c2018-08-14 15:12:49 -0700104 metadata_max_age_ms => 60000 # recheck for new topics every minute
Zack Williams7a506d22018-09-24 17:00:13 -0700105 # other topics that are not indexed: xos.gui_events, voltha.kpis, voltha.heartbeat
Matteo Scandolo7df3ee02018-11-06 16:28:11 -0800106 topics_pattern => '.*\.events|dhcp.*|onos.*|.*\.log.*'
Zack Williamsa7b3e4c2018-08-14 15:12:49 -0700107 type => "cord-kafka"
108 }
Zack Williamsa7b3e4c2018-08-14 15:12:49 -0700109 }
110
111 filters:
112 main: |-
113 filter {
114 mutate {
115 add_field => {
116 "kafka_topic" => "%{[@metadata][kafka][topic]}"
Zack Williams675b2a22018-08-27 14:22:55 -0700117 "kafka_key" => "%{[@metadata][kafka][key]}"
Zack Williamsa7b3e4c2018-08-14 15:12:49 -0700118 "kafka_timestamp" => "%{[@metadata][kafka][timestamp]}"
119 }
120 }
121
Zack Williamsa7b3e4c2018-08-14 15:12:49 -0700122 json {
123 source => "data"
124 target => "data"
125 skip_on_invalid_json => true
126 }
127 }
128
129 outputs:
130 main: |-
131 output {
132 elasticsearch {
133 hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
134 }
135 }
136
137# fluentd-elasticsearch config
138# ref: https://github.com/helm/charts/tree/master/stable/fluentd-elasticsearch
139# forwards k8s logs from nodes to elasticsearch
140fluentd-elasticsearch:
141 enabled: false
142 elasticsearch:
143 host: "logging-elasticsearch-client"
144