Project

Profile

Help

Issue #654

closed

Users are reporting that our rsyslog config example does not work

Added by rbarlow about 9 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.4.3
Platform Release:
2.6.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:

Description

Document URL:
https://pulp-user-guide.readthedocs.org/en/latest/troubleshooting.html#logging

Section Number and Name:
Logging

Describe the issue:
The following is an e-mail from Ben Stanley on Pulp List:

The documentation there regarding rsyslogd is incorrect (at least for RHEL7).

Configuring the log with the line

pulp.* /var/log/pulp.log

causes the following error when rsyslogd starts up:
rsyslogd-<pid>: unknown facility name "pulp"

rsyslogd has no log facility called pulp, so it can't be configured in the
manner described in the logging section of the troubleshooting page. The
list of facilities is fixed at compile time. Filters must be used to
select the messages instead.

The documentation for filters in rsyslogd is located here:
http://www.rsyslog.com/doc/rsyslog_conf_filter.html

The RainerScript filters allow you to select a sub-set of messages to put
into a particular file like this:

if $programname == 'pulp' then {
action(type="omfile" file="/var/log/pulp.log")
}

However, I don't know how to exclude pulp messages from /var/log/messages .

Suggestions for improvement:
Make sure our logging instructions are either accurate, or link to rsyslog docs that discuss how to filter.

Additional information:

+ This bug was cloned from Bugzilla Bug #1180163 +

Actions #1

Updated by rbarlow about 9 years ago

From Trey Dockendorf on pulp-list:

"I've been using this on EL6

:programname, isequal, "pulp" -/var/log/pulp.log
& ~

I think as long as that comes before the line that sets the /var/log/messages logging then the "& ~" will discard the messages and keep them from making it to /var/log/messages."

+ This comment was cloned from Bugzilla #1180163 comment 1 +

Actions #2

Updated by bmbouter about 9 years ago

  • Category deleted (1)
  • Tags Documentation added

Documentation is now a Tag not a Category.

Actions #3

Updated by bmbouter about 9 years ago

  • Severity changed from High to 3. High
Actions #4

Updated by bmbouter almost 9 years ago

wrath0r on #pulp reported that the solution in comment 1 worked for him. This bug is to make that documentation change and send it to QE for testing.

Actions #5

Updated by bmbouter almost 9 years ago

  • Priority changed from Normal to High

A lot of people get caught on this so I'm moving it to high priority. The other day I had 3 different users ask me how to configure rsyslogd on EL6 in one day!

Actions #6

Updated by jortel@redhat.com almost 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com
Actions #7

Updated by jortel@redhat.com almost 9 years ago

Adding this file: /etc/rsyslog.d/pulp.conf

containing:

:programname, startswith, "pulp" -/var/log/pulp.log
& ~

On RHEL 6.5 worked.

Actions #8

Updated by rbarlow almost 9 years ago

On 04/14/2015 05:09 PM, Pulp wrote:

Issue #654 has been updated by .

Adding this file: //etc/rsyslog.d/pulp.conf/

containing:

:programname, startswith, "pulp" -/var/log/pulp.log
& ~

On RHEL 6.5 worked.

We were advised with somewhat strong language from the rsyslog
maintainer not to put files into /etc/rsyslog.d/, so we should not
document this method.

--
Randy Barlow

Actions #9

Updated by jortel@redhat.com almost 9 years ago

rbarlow wrote:

On 04/14/2015 05:09 PM, Pulp wrote:

Issue #654 has been updated by .

Adding this file: //etc/rsyslog.d/pulp.conf/

containing:

:programname, startswith, "pulp" -/var/log/pulp.log
& ~

On RHEL 6.5 worked.

We were advised with somewhat strong language from the rsyslog
maintainer not to put files into /etc/rsyslog.d/, so we should not
document this method.

--
Randy Barlow

"Oh, that's rich!" - Krusty The Clown, 1995

Actions #10

Updated by jortel@redhat.com almost 9 years ago

  • Status changed from ASSIGNED to POST
Actions #11

Updated by jortel@redhat.com almost 9 years ago

  • Status changed from POST to MODIFIED
Actions #12

Updated by rbarlow almost 9 years ago

wrote:

"Oh, that's rich!" - Krusty The Clown, 1995

lol

Actions #13

Updated by Ben.Stanley almost 9 years ago

Could you please post a link to the comments from the rsyslog maintainer? I want to understand why they do not want files in /etc/rsyslog.d . It is my understanding that we create directories of config file fragments so that packages can easily configure their own appropriate settings without having to sed a shared configuration file.

Actions #14

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
  • Platform Release set to 2.6.1
Actions #16

Updated by pthomas@redhat.com almost 9 years ago

  • Status changed from 5 to 6

verified

https://pulp.readthedocs.org/en/latest/user-guide/troubleshooting.html#rsyslogd
<\pre>
Actions #17

Updated by theinric almost 9 years ago

Ben.Stanley wrote:

Could you please post a link to the comments from the rsyslog maintainer? I want to understand why they do not want files in /etc/rsyslog.d . It is my understanding that we create directories of config file fragments so that packages can easily configure their own appropriate settings without having to sed a shared configuration file.

Here you have it directly from the source (Fedora, RHEL).
The short answer is that rsyslog's configuration is not very well suited for being split into multiple pieces that are not aware of each other. Some options are global and changing them in one piece would affect the other pieces. The different pieces might be having conflicting requirements. The only way to make this work automatically (from users perspective) would be for all the packages shipping config fragments to be aware of all the other packages doing this and keep up with updates. Highway to hell.
I'd prefer for packages to ship config fragments as samples that the user would revise and drop to rsyslog.d manually.

Still, sed-ing config files is probably the greater evil.

Actions #18

Updated by dkliban@redhat.com over 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #20

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF