Troubleshooting

An administrator has just added an rsyslog rule that forwards auth.alert messages to a remote collector. The rule must be tested without waiting for a real event. Which command generates a message that the rule should match?

Show the answer

Correct answerB. logger -p auth.alert "test alert"

logger -p sets the facility and priority of the message, so -p auth.alert produces a message that matches the rule. The -t option only sets the tag, so the message would use the default user.notice and miss the rule.