blob: b33044356b3dd9f3253d533b43d36bf5d6fb98b9 [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
Zack Williams675b2a22018-08-27 14:22:55 -070084 topics_pattern => 'authentication.*|dhcp.*|onos.*|onu.*|voltha.*|xos.*'
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070085 type => "cord-kafka"
86 }
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070087 }
88
89 filters:
90 main: |-
91 filter {
92 mutate {
93 add_field => {
94 "kafka_topic" => "%{[@metadata][kafka][topic]}"
Zack Williams675b2a22018-08-27 14:22:55 -070095 "kafka_key" => "%{[@metadata][kafka][key]}"
Zack Williamsa7b3e4c2018-08-14 15:12:49 -070096 "kafka_timestamp" => "%{[@metadata][kafka][timestamp]}"
97 }
98 }
99
100 date {
101 match => [ "ts", "UNIX" ]
102 target => "voltha_ts"
103 tag_on_failure => []
104 }
105
106 json {
107 source => "data"
108 target => "data"
109 skip_on_invalid_json => true
110 }
111 }
112
113 outputs:
114 main: |-
115 output {
116 elasticsearch {
117 hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
118 }
119 }
120
121# fluentd-elasticsearch config
122# ref: https://github.com/helm/charts/tree/master/stable/fluentd-elasticsearch
123# forwards k8s logs from nodes to elasticsearch
124fluentd-elasticsearch:
125 enabled: false
126 elasticsearch:
127 host: "logging-elasticsearch-client"
128