I’m not sure what it expects here. In the documentation it clearly states that it requires a string, which I’m providing. Could anyone point me to better documentation or just give me a solution to this?
I’ve eventually figured it out by looking at an older configuration of promtail. I am not sure why the documentation is so bad and if this is intentional, but this is really discouraging.
This is the only given explanation for matches. It might as well not have existed:
Journal matches to filter. The + character is not supported, only logical AND matches will be added.
For anyone coming across the same issue (which I think is a basic feature, i.e. to choose the logs of an arbitrary systemd service instead of sending all the journald logs!), this is the right syntax:
matches = "_SYSTEMD_UNIT=netbox.service"
I still haven’t figured out how to chain several matches, given the amazingly helpful definition above. Literal AND doesn’t seem to work on various tries.
The docs are being worked on every day. There are a lot of gaps and I’m working on filling them. If you come across any more issues with the docs, please open up an issue and let us know. We will work on improving it (the gaps in the docs are not intentional)