Information: Forum is in read-only mode
For details and other support options see

rsyslog send email script not working well

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: alorbach

Google Ads

rsyslog send email script not working well

Postby mywolfking » Sat Feb 24, 2018 9:53 am

I use rsyslog to collect the switch device log.
and i could see the log already in the rsyslog server

i use a python script to send log to my mailbox. this is some configure of rsyslog.conf
Code: Select all
#configure the network device log
local2.*        /var/log/Internal.log
if $pri-text contains 'local2' then action (type="omprog"
binary="/usr/bin/python /var/log/"

and when i use this line in bash, it work well. and i could receive the email.
Code: Select all
echo " this |is |test| info| content" | /usr/bin/python

when i user "systemctl restart rsyslog.service " on ubuntu the rsyslog could send me email one or two days, but after 1-2 days ,it will not send me no more email.
and i checked the Internal.log file, there are new log also. but when i restart the services of rsyslog, it would send me email agagin.

so i want to know why rsyslog stop send me email. thanks

Code: Select all
rsyslogd 8.16.0, compiled with:
   PLATFORM:            x86_64-pc-linux-gnu
   PLATFORM (lsb_release -d):
   FEATURE_REGEXP:            Yes
   GSSAPI Kerberos 5 support:      Yes
   FEATURE_DEBUG (debug build, slow code):   No
   32bit Atomic operations supported:   Yes
   64bit Atomic operations supported:   Yes
   memory allocator:         system default
   Runtime Instrumentation (slow code):   No
   uuid support:            Yes
   Number of Bits in RainerScript integers: 64
Posts: 1
Joined: Sat Feb 24, 2018 9:39 am

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Google Ads

Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests