deployment/logs-benchmark/single: use udp input for fluentbit

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
Zakhar Bessarab 2023-12-12 20:55:13 +04:00
parent a987f2fab9
commit ae52ee1857
No known key found for this signature in database
GPG key ID: 932B34D6FE062023
5 changed files with 9 additions and 19 deletions

View file

@ -33,13 +33,13 @@ services:
- -syslog.addr=fluentbit:5140
- -syslog.addr2=fluentbit:5140
- -logs.randomSuffix=false
depends_on: [ rsyslog ]
depends_on: [ fluentbit ]
fluentbit:
image: cr.fluentbit.io/fluent/fluent-bit:2.1.4
volumes:
- ./single/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
depends_on: [victorialogs]
depends_on: [vlogs]
ports:
- "5140:5140"

View file

@ -71,11 +71,11 @@ func main() {
truncate := tagLen - 48
syslogTag = syslogTag[truncate:]
}
logger, err := syslog.Dial("tcp", *syslogAddr, syslog.LOG_INFO, syslogTag)
logger, err := syslog.Dial("udp", *syslogAddr, syslog.LOG_INFO, syslogTag)
if err != nil {
panic(fmt.Errorf("error dialing syslog: %w", err))
}
logger2, err := syslog.Dial("tcp", *syslogAddr2, syslog.LOG_INFO, syslogTag)
logger2, err := syslog.Dial("udp", *syslogAddr2, syslog.LOG_INFO, syslogTag)
if err != nil {
panic(fmt.Errorf("error dialing syslog: %w", err))
}

View file

@ -1,17 +1,8 @@
[INPUT]
name tail
path /var/lib/docker/containers/**/*.log
path_key path
multiline.parser docker, cri
Parser docker
Docker_Mode On
[INPUT]
Name syslog
Name udp
Listen 0.0.0.0
Port 5140
Parser syslog-rfc3164
Mode tcp
Format none
[SERVICE]
Flush 1

View file

@ -37,10 +37,9 @@ type tokenizer struct {
func (t *tokenizer) reset() {
m := t.m
t.m = make(map[string]struct{})
//for k := range m {
// delete(m, k)
//}
for k := range m {
delete(m, k)
}
}
func tokenizeString(dst map[string]struct{}, s string) {