0

I am trying to send syslogs from routers/switches in a production environment to a linux server which has Rsyslog installed on it. Its working fine as long as rsyslog config file is set to receive logs from one switch, as soon as I am making changes to the rsyslog configuration file to receive logs from another switch as well , its throwing error while restarting rsyslog server after making changes and the logs are no longer recorded. Its back to normal operation of recording logs as long as I am configuring it to receive logs from just one switch.enter image description here

Zius_123
  • 1
  • 1
  • # # Where to place spool and state files # $WorkDirectory /var/spool/rsyslog module(load="imfile" PollingInterval="10") # # Include all config files in /etc/rsyslog.d/ # $IncludeConfig /etc/rsyslog.d/*.conf If $fromhost-ip == "##.##.#.###" then { Action (type="omfile" File="/home/**path**/**path**/**path**/latest.log") } If $fromhost-ip == "##.##.#.###" then { Action (type="omfile" File="/**path**/*path*/*path*/***/latest.log") } – Zius_123 Jul 02 '21 at 21:59
  • 1
    If you need to add more information to your question, **edit the question** rather than adding it as a comment. As you can see, comments don't allow you to properly format config files or source code, rendering them almost unreadable. It is also much better to include text directly in your question, rather than linking to *images* of text (because we can't copy-and-paste text from the image, and when the linked image expires this question will be useless to future readers). – larsks Jul 03 '21 at 00:47

0 Answers0