I try to read logs from systemd for vault.service ...
# fluent-bit
d
I try to read logs from systemd for vault.service .. but I'm not able to send output to Graylog / Victoria-logs. I don't see anything coming. I use something like: /insert/jsonline?_msg_field=log and Gelf_Short_Message_Key: log. Can it be, that I need to use something different?
hmm, ok tested with non-tls and tcpdump .. its log. Then the issue is somewhere else.
Ah, no .. its message
p
It's going to be impossible to help without some kind of config to look at. I'd suggest using the stdout output as well to help you see if you are actually getting the logs in first so you know whether it is an input or output problem: https://www.fluent.do/blog/debugging-tips
d
Hi, I had to add prefix drop and lowercase .. and change gelf output to message and VL also to message. Then I was able to see logs.
for input tail etc. I have to use "log", but syslog and systemd requires "message"
For the records:
Copy code
- name: systemd
    systemd_filter: _SYSTEMD_UNIT=vault.service
    strip_underscores: on
    lowercase: on
    read_From_tail: on
    db: /var/log/flb-storage/tail_vault.db
    tag: "vault"
This and:
Copy code
...    
Gelf_Short_Message_Key: message

...

    uri: "/insert/jsonline?_msg_field=message"
then it started to work.
p
you can standardise to the same key if you want easily enough - there's filters to rename keys if they exist so you can then have a single output for them all
plus the tail input lets you specify the default key, if you do not then it defaults to
log
so the best option may just be to specify
message
there as the default key
parsers will also control the key names
d
Sounds not bad .. would maintaining a bit easier