mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-24 06:54:57 -04: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
|
@ -93,7 +93,6 @@ func NewStartTrigger(ctx context.Context, wg *sync.WaitGroup, provider cloudprov
|
|||
pipelineConf := logstashConfInput{
|
||||
Port: 5044,
|
||||
Host: openSearchHost,
|
||||
IndexPrefix: "systemd-logs",
|
||||
InfoMap: infoMapM,
|
||||
Credentials: creds,
|
||||
}
|
||||
|
@ -272,7 +271,6 @@ func startPod(ctx context.Context, logger *logger.Logger) error {
|
|||
type logstashConfInput struct {
|
||||
Port int
|
||||
Host string
|
||||
IndexPrefix string
|
||||
InfoMap map[string]string
|
||||
Credentials credentials
|
||||
}
|
||||
|
|
|
@ -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