Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to config rsyslog's error log #3541

Open
yfliuyanyan opened this issue Mar 12, 2019 · 4 comments
Open

How to config rsyslog's error log #3541

yfliuyanyan opened this issue Mar 12, 2019 · 4 comments

Comments

@yfliuyanyan
Copy link

Expected behavior

We use rsyslog to collect our business logs, and send them to my fwd by relp. But sometimes, business logs are not sent to my fwd.
To find out the reason, I want to see the error log of rsyslog itself. But I don't know where it is and how to set it.
Any help? Thanks.

Environment

  • rsyslog version: 8.36.0
  • platform:
  • for configuration questions/issues, include rsyslog.conf and included config files
@rgerhards rgerhards reopened this Mar 13, 2019
@rgerhards
Copy link
Member

Messages are reported to the syslog stream as syslog.=error. Done depending on config via journal or direct .

@yfliuyanyan
Copy link
Author

@rgerhards Thanks for your reply.
But where can I find it?
Where can I config journal or direct?

@rgerhards
Copy link
Member

post your full conf

@vonBork
Copy link

vonBork commented Jul 2, 2019

Check your /etc/rsyslog.conf file. At the begining you need to add

global(processInternalMessages="on")

to your file. Later in the Rules Part add the following lines

syslog.=error /var/log/rsyslog/rsyslog_error.log
& stop

Which means write every rsyslog message with loglevel error to file /var/log/rsyslog/rsyslog_error.log. The & and stop will stop sending these messages to /var/log/messages. At least if you define that rule before the /var/log/messages definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants