RainerScript - idea for a new feature

General discussions here

Moderator: rgerhards

RainerScript - idea for a new feature

Postby lperr on Sat Aug 16, 2008 8:34 am

Hi, I have a development machine which gets rebooted quite often and I would like to avoid being flooded each time with kernel messages during the boot sequence.

I could do
Code: Select all
if $programname == 'kernel' and $syslogfacility-text == 'kern' then ~

but then I would loose more than I'd like to.

So I thought that adding an action that sets a flag or a variable might be a good idea.
Other rules could then check this variable and act accordingly.

To better explain what I have in mind here's some pseudocode
Code: Select all
# Discard the first line from the boot sequence and set a variable
if $programname == 'kernel' and $syslogfacility-text == 'kern' and $msg == 'BIOS-provided physical RAM map:' then ~
& set $a = 1
# Discard the last line from the boot sequence and clear the variable
if $programname == 'kernel' and $syslogfacility-text == 'kern' and $msg == 'EXT3 FS on xvda, internal journal' then ~
& unset $a
# Discard boot messages if the variable is set
if $programname == 'kernel' and $syslogfacility-text == 'kern' and $a == 1 then ~


I don't know if this is feasible at all or if there are already better ways to do this.
I checked the documentation and didn't find anything similar, maybe this could be of interest for other people too.
What do you think about it?
lperr
Advanced
 
Posts: 26
Joined: Wed Aug 06, 2008 12:00 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: RainerScript - idea for a new feature

Postby hkspvt on Mon Aug 18, 2008 2:57 pm

It is not yet possible, but Rainer has mentioned a few times that he'll be implementing a full scripting language into the config file. That revision should make this kind of setup trivial.

-HKS
hkspvt
Frequent Poster
 
Posts: 117
Joined: Thu Jun 26, 2008 6:31 pm

Re: RainerScript - idea for a new feature

Postby rgerhards on Mon Sep 01, 2008 7:29 am

Yes, exactly, and it would probably be implemented much in the way it was suggested in the initial post. I am now back, need to look at all the lose ends and will - provided nothing major has changed while I was away - begin to look into scripting.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron