Configure modern RainerScript so rsyslog receives UDP log packets on port 514.
Which module and input pair is appropriate?
imudp is the input module and input(type="imudp" port="514") creates the UDP listener.
Detailed explanation
module(load="omudp") / output(type="omudp" port="514")Incorrect. omudp is an output module for sending, not receiving.
Incorrect. omudp is an output module for sending, not receiving.
module(load="imudp") / input(type="imudp" port="514")Correct. imudp and an imudp input create the UDP listener.
Correct. imudp and an imudp input create the UDP listener.
module(load="imtcp") / input(type="imtcp" port="514")Incorrect. imtcp creates a TCP listener.
Incorrect. imtcp creates a TCP listener.
module(load="imjournal") / input(type="imjournal" port="514")Incorrect. imjournal reads the local journal rather than network UDP.
Incorrect. imjournal reads the local journal rather than network UDP.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s\n' 'module(load="imudp")' 'input(type="imudp" port="514")'Expected result
imudp module行とUDP input行Key points
- im is input
- om is output
- Distinguish UDP and TCP
Notes
- Environment: 合成RainerScriptの表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.