Add on end of line
Tags:
#1
5ss0
Hi I have this config:
<Input WarnLog>
Module im_file
File 'C:\warnlog.txt'
</Input>
<Input SpamLog>
Module im_file
File 'C:\spamlog.txt'
</Input>
<Output out>
Module om_udp
Host 192.168.1.2
Port 5555
</Output>
<Route 1>
Path WarnLog => out
</Route>
<Route 2>
Path SpamLog => out
</Route>
Warnlog look like this:
16.09.2022 11:54:54 Update Updater: Switch modules type retval = 0x00005007 [NOT NEED] SYSTEM
16.09.2022 11:54:54 Update Updater: retval = 0x5003, failures: 0, profile: aktualizacja, trigger: ConfigChange SYSTEM
16.09.2022 11:54:54 Update Mirror: retval = 0x5003 SYSTEM
Spamlog:
16.09.2022 12:07:24 some@address.com some@address.com RE: subject 16.09.2022 12:04:59 0 No rule classifies the email Retained H|RN=0;RNP=
16.09.2022 12:12:24 some@address.com some@address.com RE: subject 16.09.2022 12:09:51 0 No rule classifies the email Retained H|RN=0;RNP=
Everything works fine, i see messages on my syslog server, but i don't know what type of message it is. From spamlog or form warnlog. How can I add something to the end of each line before sending to syslog. Or there is other way?
#1
5ss0
Hi
I have this config:
<Input WarnLog>
Module im_file
File 'C:\warnlog.txt'
</Input>
<Input SpamLog>
Module im_file
File 'C:\spamlog.txt'
</Input>
<Output out>
Module om_udp
Host 192.168.1.2
Port 5555
</Output>
<Route 1>
Path WarnLog => out
</Route>
<Route 2>
Path SpamLog => out
</Route>
Warnlog look like this:
16.09.2022 11:54:54 Update Updater: Switch modules type retval = 0x00005007 [NOT NEED] SYSTEM
16.09.2022 11:54:54 Update Updater: retval = 0x5003, failures: 0, profile: aktualizacja, trigger: ConfigChange SYSTEM
16.09.2022 11:54:54 Update Mirror: retval = 0x5003 SYSTEM
Spamlog:
16.09.2022 12:07:24 some@address.com some@address.com RE: subject 16.09.2022 12:04:59 0 No rule classifies the email Retained H|RN=0;RNP=
16.09.2022 12:12:24 some@address.com some@address.com RE: subject 16.09.2022 12:09:51 0 No rule classifies the email Retained H|RN=0;RNP=
Everything works fine, i see messages on my syslog server, but i don't know what type of message it is. From spamlog or form warnlog.
How can I add something to the end of each line before sending to syslog. Or there is other way?
Hello Sir,
You can add text for example at the end or start of the line via concatenation for example.
Sincerely Klevin