Proteggiamo il tuo ambiente digitale da qualsiasi attacco informatico. Sfrutta tutte le potenzialità della piattaforma SGBox!



Via Melchiorre Gioia, 168 - 20125 Milano

+39 02 60830172

Search another article?

You are here:
< Back

In /etc/ryslog.d/ add a file with priority like 60-myfileconfig.conf , this will be read after the main 50-default.conf file.

In this example, to read a Desktop log file:

$ModLoad imfile #Load the imfile input module
$InputFilePollInterval 2
$InputFileName /home/user/Desktop/events.log
$InputFileTag file-access:
$InputFileStateFile stat-file-access
$InputFileSeverity Info
$template file_log, " %msg% "

if $programname == 'file-access' then @;file_log
if $programname == 'file-access' then stop

This configuration will read the file events.log and send it via syslog protocol UDP to the machine .

The example content of the file events.log:

Test1 1 1 11 1 11 1

Testadasda sd 5 5 5 55 5
test / 17.57

If no data timestamp is specified to the beginning of each line, there is the risk to have duplicated log.

See the results in LM > Analysis > Historical search
rSyslog read custom files