Open jan-kaufmann opened 1 year ago
I'm removing the bug
label for now in favor of enhancement
. The Agent logs everything to stderr
which are then picked up by systemd with the same priority.
It would take a lot of effort for the Agent to log directly to journald with the correct level; on the other hand, you can use pipeline_stages to parse the Agent's log line and use that to set the level
label instead of depending on the __journal_priority_keyword
key.
What's wrong?
I noticed that most logs of my grafana-agent instance appear to have
level=info
but there are quite a fewwarnings
anderrors
misclassified. (Screenshot is only about error but same appears for warnings)I see the same results when I filter the local journalctl for log lines with priority info vs warning|error. So this has nothing todo with the scraping or the pipeline. I see a few warnings when filtering for info:
But once I filter for warnings and errors I only get error messages thrown by the systemd service - but not from the grafana agent application running within.
Steps to reproduce
Generate an error message by modifying the config file (e.g. try to set a field that does not exist because of a typo) and restart the grafana-agent service.
Filter the journal for log level
INFO
(akapriority
) and search forlevel=warn
System information
Fedora Linux 35 x86/64
Software version
grafana-agent-0.33.1-1.src.rpm
Configuration
Logs