public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* Audit format utility
@ 2014-09-23 22:03 Steve Grubb
  2014-09-25 16:16 ` LC Bruzenak
  0 siblings, 1 reply; 8+ messages in thread
From: Steve Grubb @ 2014-09-23 22:03 UTC (permalink / raw)
  To: Linux-audit

Hello,

I have been doing some thinking about allowing user defined formats to be
declared as a parameter to ausearch. Before I commit to that, I thought it
might be interesting to create a "mockup". I have placed a utility here:

http://people.redhat.com/sgrubb/files/auformat.tar.gz

Just untar it and run make.

$ ./auformat 
Usage: auformat <format-string> [path-to-log] --fill

What this means is that you can give it a path to a file. If you don't do that,
it will read from stdin. Then it will output the fields that you specify. To
specify fields start with a % and then put the name as seen in logs. A couple examples:

%auid  %pid  %path  %exe

This will dump the raw value. But suppose you wanted the interpreted values?
Tell it to interpret by giving uppercase:

%AUID  %SYSCALL  %RES  %PATH

Not all events have all fields. By default it will emit a message to stderr
about this. But, you can give it --fill which will print "(none)" in that case.

So, a use might be:

# ausearch --start today -m login --raw | ~sgrubb/test/auformat/auformat "%time %AUID %ses %RES\n"

The app also has 4 virtual field names: date, time, milli, serial. These
relate to the event timestamp which you couldn't specify any other way.

In any event, I am putting this out to see what people think.

-Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-02 21:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23 22:03 Audit format utility Steve Grubb
2014-09-25 16:16 ` LC Bruzenak
2014-09-26  3:05   ` Steve Grubb
2014-09-26 15:24     ` LC Bruzenak
2014-09-28  4:52       ` Burn Alting
2014-10-01 18:44         ` Steve Grubb
2014-10-01 21:44           ` Burn Alting
2014-10-02 21:23             ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox