Forward all logs to loghub.example.test port 514 using traditional TCP syslog forwarding.
Which action is appropriate?
Traditional rsyslog uses @@HOST:PORT for TCP forwarding and @HOST:PORT for UDP.
Detailed explanation
*.* @loghub.example.test:514Incorrect. A single @ selects UDP.
Incorrect. A single @ selects UDP.
*.* tcp://loghub.example.test:514Incorrect. This is not the traditional @@ action form requested.
Incorrect. This is not the traditional @@ action form requested.
*.* @@loghub.example.test:514Correct. @@ selects TCP forwarding.
Correct. @@ selects TCP forwarding.
*.* /loghub.example.test:514Incorrect. It is a local-file action form.
Incorrect. It is a local-file action form.
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 TCP
- @ is UDP
- Queues may be needed for reliable forwarding
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.