mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-11-11 16:25:05 -05:00
ci: separate logs and metrics indices (#2544)
* separate logs and metrics indices * tidy
This commit is contained in:
parent
0c03076181
commit
9a282df846
4 changed files with 36 additions and 35 deletions
|
|
@ -55,12 +55,28 @@ filter {
|
|||
}
|
||||
|
||||
output {
|
||||
opensearch {
|
||||
hosts => "{{ .Host }}"
|
||||
index => "{{ .IndexPrefix }}-%{+YYYY.MM.dd}"
|
||||
user => "{{ .Credentials.Username }}"
|
||||
password => "{{ .Credentials.Password }}"
|
||||
ssl => true
|
||||
ssl_certificate_verification => true
|
||||
if ([@metadata][beat] == "filebeat") {
|
||||
# Logs, which are output by filebeat, go to the logs-index.
|
||||
opensearch {
|
||||
hosts => "{{ .Host }}"
|
||||
# YYYY doesn't handle rolling over the year, so we use xxxx instead.
|
||||
# See https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/541#issuecomment-270923437.
|
||||
index => "logs-%{+xxxx.ww}"
|
||||
user => "{{ .Credentials.Username }}"
|
||||
password => "{{ .Credentials.Password }}"
|
||||
ssl => true
|
||||
ssl_certificate_verification => true
|
||||
}
|
||||
} else {
|
||||
opensearch {
|
||||
hosts => "{{ .Host }}"
|
||||
# YYYY doesn't handle rolling over the year, so we use xxxx instead.
|
||||
# See https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/541#issuecomment-270923437.
|
||||
index => "metrics-%{+xxxx.ww}"
|
||||
user => "{{ .Credentials.Username }}"
|
||||
password => "{{ .Credentials.Password }}"
|
||||
ssl => true
|
||||
ssl_certificate_verification => true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue