blob: a3c0690daf71b8488aa2ac3c6d5e081a25d75d90 [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
48# logstash config
49# ref: https://github.com/helm/charts/tree/master/incubator/logstash
50logstash:
51 enabled: true
52 elasticsearch:
53 host: "logging-elasticsearch-client"
54
55 # we have kafka, so persistence isn't needed
56 # ref: https://www.elastic.co/guide/en/logstash/current/persistent-queues.html
57 persistence:
58 enabled: false
59
Zack Williams11255982018-08-27 14:22:55 -070060 # Probe default delays are too short, which puts logstash into a reboot loop
61 livenessProbe:
62 initialDelaySeconds: 120
63
64 readinessProbe:
65 initialDelaySeconds: 120
66
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070067 # 'config' k/v are turned into env vars for logstash container
68 # ref: https://www.elastic.co/guide/en/logstash/current/docker-config.html#docker-env-config
69 # config:
70 # LOG_LEVEL: trace
71
72 # Kafka input plugin
73 # ref: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html
74 inputs:
75 main: |-
76 input {
77 kafka {
78 bootstrap_servers => "cord-kafka:9092"
79 client_id => "logstash_ck"
80 codec => json { charset => "UTF-8" }
81 consumer_threads => 1
82 decorate_events => true
83 metadata_max_age_ms => 60000 # recheck for new topics every minute
84 topics_pattern => 'authentication.*|dhcp.*|onos.*|onu.*|xos.*'
85 type => "cord-kafka"
86 }
87 kafka {
88 bootstrap_servers => "voltha-kafka:9092"
89 client_id => "logstash_vk"
90 codec => json { charset => "UTF-8" }
91 consumer_threads => 1
92 decorate_events => true
93 metadata_max_age_ms => 60000 # recheck for new topics every minute
94 topics_pattern => 'voltha.*'
95 type => "voltha-kafka"
96 }
97 }
98
99 filters:
100 main: |-
101 filter {
102 mutate {
103 add_field => {
104 "kafka_topic" => "%{[@metadata][kafka][topic]}"
105 "kafka_timestamp" => "%{[@metadata][kafka][timestamp]}"
106 }
107 }
108
109 date {
110 match => [ "ts", "UNIX" ]
111 target => "voltha_ts"
112 tag_on_failure => []
113 }
114
115 json {
116 source => "data"
117 target => "data"
118 skip_on_invalid_json => true
119 }
120 }
121
122 outputs:
123 main: |-
124 output {
125 elasticsearch {
126 hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
127 }
128 }
129
130# fluentd-elasticsearch config
131# ref: https://github.com/helm/charts/tree/master/stable/fluentd-elasticsearch
132# forwards k8s logs from nodes to elasticsearch
133fluentd-elasticsearch:
134 enabled: false
135 elasticsearch:
136 host: "logging-elasticsearch-client"
137