Configure System Logging Flashcards

1
Q

SLES 15 has 2 options, for system logging:

A

1) rsyslog for main monitoring
2) systemd journal for local system-related logging. It is missing some rsyslog features and it can be set to forward to rsyslog which is recommended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where is recommended that systemd journal forward messages to?

A

rsyslog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which is the main config file for rsyslogd?

A

c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command do you have to run after modifying this file > /etc/rsyslog.conf?

A

systemctl restart rsyslog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What file contains rsyslog service run-time parameters?

A

/etc/sysconfig/syslog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Logging is made up of?

A

rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

rules are made up of?

A

1) selector > (set of messages): facilities, priorities

2) action > what to do with the matches (destination/target)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

example of a logging rule:

A

filter action
mail.* -/var/log/mail

mail is the facility
action is determines the destination
the - means this message is not so important

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

example of selectors and priorities:

A

fac. * all priorities
fac. pri that priority and higher
fac. =pri just that priority
fac. !pri all priorities BUT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Some facilities (think of them as categories of what to log) are:

A

kernel, user, mail, daemon, auth, syslog, cron, security, ntp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

some priorities are:

A

emerg, alert, crit, err, warn

0 1 2 3 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

To configure systemd journal Persistency

A

vi /etc/systemd/journal.conf
storage=persistent it is says “auto” it will forward to rsyslog

then

systemctl restart journald

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Should you need rsyslog if running a local-only system?

A

No. If rsyslog is installed and configured, systemd will be configured by default to forward entries to rsyslog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you configure journal forwarding to rsyslog?

A

vi /etc/systemd/journal.conf
ForwardToSyslog=yes

then

systemctl restart journald

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what command shows you only the latest kernel entries?

A

journalctl -k

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what command shows you entries for a unit?

A

journalctl -u chronyd