Forward all logs to loghub.example.test port 514 using traditional UDP syslog forwarding.
Which action is appropriate?
In traditional rsyslog actions, one @ means UDP forwarding and two @@ means TCP forwarding.
Detailed explanation
*.* @@loghub.example.test:514Incorrect. @@ selects TCP forwarding.
Incorrect. @@ selects TCP forwarding.
*.* @loghub.example.test:514Correct. A single @ selects traditional UDP forwarding.
Correct. A single @ selects traditional UDP forwarding.
*.* /loghub.example.test:514Incorrect. A leading slash denotes a local file action.
Incorrect. A leading slash denotes a local file action.
@loghub.example.test:514 *.*Incorrect. The action follows the selector.
Incorrect. The action follows the selector.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '*.* @loghub.example.test:514' | awk '{print $2}'Expected result
@loghub.example.test:514Key points
- @ is UDP
- @@ is TCP
- 514 is a common syslog port
Notes
- Environment: POSIX awk / 外部通信なし
- 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.