txt file data to remote syslog server via rsyslog

yevgen1991

New Member
Joined
Oct 24, 2020
Messages
1
Reaction score
0
Credits
20
Hi all!

I am not good in CentOS, just know some commands and how this system works. My sphere is windows :)

So, my challenge:

I have CentOS server with rsyslog service. Before testing in prod environment, I installed free syslog server on my Windows PC. Then I configured rsyslog.conf file, and now i am getting logs from CentOS on my Windows PC. So, I have a connection and the first step is taken well!

Then,

I have example.txt file in "\etc\folder\" , this file is a log file, which is constantly generated (adding new line of data every second) by another program. In fact, this is a log file of this program.

I enabled $ModLoad imfile in rsyslog.conf and added input(Type="imfile" File="\etc\folder\example.txt" Tag="testtxt" Severity="info") into new conf file "/etc/rsyslog.d/test.conf".

Now, when i add "hello world" into the test.txt, my syslog server recieve "hello world". But when i add another "hello world 2" word after first and save it, i get "hello world" and then "hello world 2", but I need to get only the second one, without dublication.

How can I resolve this issue? Which script must i add into "/etc/rsyslog.d/test.conf" or rsyslog.conf?

Thanks All!
 

Members online


Latest posts

Top