Commit graph

273 commits

Author SHA1 Message Date
Robin Sommer
f36310dc0e Updating submodule(s). 2011-08-08 19:23:20 -07:00
Robin Sommer
e9f7d82ac2 Updating submodule(s). 2011-08-08 16:34:36 -07:00
Robin Sommer
bbb0b855a2 Merge branch 'topic/robin/rotation-pp'
* topic/robin/rotation-pp:
  Adding a default_path_func that makes the default naming scheme script-level controlled.
  Reworking logging's postprocessor logic.

Conflicts:
	scripts/base/frameworks/logging/main.bro
	testing/btest/policy/frameworks/logging/rotate-custom.bro
2011-08-08 16:14:54 -07:00
Robin Sommer
202103d9d1 Updating submodule(s). 2011-08-05 19:14:18 -07:00
Robin Sommer
08bf644848 Updating submodule(s). 2011-08-03 22:19:50 -07:00
Robin Sommer
68171cf179 Updating submodule(s). 2011-08-03 17:05:27 -07:00
Robin Sommer
d8aece07d7 Merge remote-tracking branch 'origin/topic/jsiwek/raw_output'
* origin/topic/jsiwek/raw_output:
  Fix &raw_output and enable_raw_output interpretation of NUL characters
2011-08-03 16:27:52 -07:00
Robin Sommer
f0fd0b3221 Updating submodule(s). 2011-07-31 21:30:31 -07:00
Robin Sommer
a130b1f538 Updating submodule(s). 2011-07-30 18:29:04 -07:00
Robin Sommer
ac6f8c34a9 Updating submodule(s). 2011-07-30 18:26:43 -07:00
Robin Sommer
96a9d488e0 Reworking logging's postprocessor logic.
The main change is that the postprocessor commands are no longer run
by the log writers themselves. Instead, the writers send back a
message to the log mgr once they have rotated. The manager then calls
a script level function to do somethign with the rotated file. By
default, it will be renamed to somethingn nice and then a
postprocessor shell command will be run on it if defined.

Pieces going into this:

    - Terminology change: "postprocessor" now refers to a script
    *function*. In addition, there are "postprocessor commands", which
    are shell commands that may be triggered by the function to run on
    a rotated file.

    - The RotationInfo record now comes with all the information that
    was previously provided internally to the C++ function running the
    post-processor command.

    - Changing the default time format to %Y-%m-%d-%H-%M-%S

    - rotation_path_func is gone

    - The default postprocessor function is defined individually by
      each LogWriter in frameworks/logging/plugin/*

    - The interface to postprocessor shell commands remains the same.

Needs a bit more testing ...
2011-07-29 17:32:33 -07:00
Robin Sommer
ae9c6a8fea Updating submodule(s). 2011-07-22 17:37:44 -07:00
Robin Sommer
ba40200ba2 Moving devel-tools to bro-aux. 2011-07-22 17:34:18 -07:00
Robin Sommer
6b857094c9 Updating submodule(s). 2011-07-22 17:16:08 -07:00
Robin Sommer
2b2a8d527f Removing debugging output from script. 2011-07-19 19:11:21 -07:00
Robin Sommer
d6b8b4a65f Updating submodule(s). 2011-07-19 19:07:30 -07:00
Robin Sommer
31f68c7627 Adding a script to update CHANGES and VERSION.
This is still experimental ...
2011-07-19 19:07:11 -07:00
Robin Sommer
2e9b64a7dd Updating submodule(s). 2011-07-19 17:54:57 -07:00
Robin Sommer
de58e54397 Updating submodule(s). 2011-07-19 17:40:13 -07:00
Robin Sommer
1b7bf29896 Updating submodule(s). 2011-07-19 17:40:12 -07:00
Robin Sommer
2afb3ea1a1 Updating submodule(s). 2011-07-19 17:40:12 -07:00
Robin Sommer
cdd8827cc4 Adding a script that extracts a connection from a trace based on uid.
The script parsed conn.log to find the 4-tuple and then runs tcpdump
to find the relevant packets.
2011-07-07 19:56:48 -07:00
Robin Sommer
df1b2f922b Renaming reporter_message to report_info.
Same change internally.
2011-07-07 19:56:25 -07:00
Robin Sommer
c8f5a1eeaa Updating submodule(s). 2011-07-05 18:48:55 -07:00
Robin Sommer
3340bc0f26 Updating submodule(s). 2011-07-01 22:20:34 -07:00
Robin Sommer
ed727aeaad Updating submodule(s). 2011-07-01 22:05:01 -07:00
Robin Sommer
c21d75489f Updating submodule(s). 2011-07-01 22:03:31 -07:00
Robin Sommer
c1a3cc0e5a Updating submodule(s). 2011-07-01 22:02:17 -07:00
Robin Sommer
bbb57329fd Updating submodule(s). 2011-07-01 22:00:54 -07:00
Robin Sommer
cea00fe51b Missing pieces. 2011-07-01 21:59:25 -07:00
Robin Sommer
9709b1d522 Merge remote branch 'origin/topic/robin/reporting'
* origin/topic/robin/reporting:
  Syslog BiF now goes through the reporter as well.
  Avoiding infinite loops when an error message handlers triggers errors itself.
  Renaming the Logger to Reporter.
  Overhauling the internal reporting of messages to the user.

Updating a bunch of tests/baselines as well.

Conflicts:
	aux/broccoli
	policy.old/alarm.bro
	policy/all.bro
	policy/bro.init
	policy/frameworks/notice/weird.bro
	policy/notice.bro
	src/SSL-binpac.cc
	src/bro.bif
	src/main.cc
2011-07-01 13:59:21 -07:00
Robin Sommer
704cc45165 Updating submodule(s). 2011-06-25 18:22:45 -07:00
Robin Sommer
93894eed9b Overhauling the internal reporting of messages to the user.
The Logger class is now in charge of reporting all errors, warnings,
informational messages, weirds, and syslogs. All other components
route their messages through the global bro_logger singleton.

The Logger class comes with these reporting methods:

    void Message(const char* fmt, ...);
    void Warning(const char* fmt, ...);
    void Error(const char* fmt, ...);
    void FatalError(const char* fmt, ...); // Terminate Bro.
    void Weird(const char* name);
    [ .. some more Weird() variants ... ]
    void Syslog(const char* fmt, ...);
    void InternalWarning(const char* fmt, ...);
    void InternalError(const char* fmt, ...); // Terminates Bro.

See Logger.h for more information on these.

Generally, the reporting now works as follows:

    - All non-fatal message are reported in one of two ways:

        (1) At startup (i.e., before we start processing packets),
            they are logged to stderr.

        (2) During processing, they turn into events:

            event log_message%(msg: string, location: string%);
            event log_warning%(msg: string, location: string%);
            event log_error%(msg: string, location: string%);

            The script level can then handle them as desired.

            If we don't have an event handler, we fall back to
            reporting on stderr.

    - All fatal errors are logged to stderr and Bro terminates
      immediately.

    - Syslog(msg) directly syslogs, but doesn't do anything else.

The three main types of messages can also be generated on the
scripting layer via new Log::* bifs:

    Log::error(msg: string);
    Log::warning(msg: string);
    Log::message(msg: string);

These pass through the bro_logger as well and thus are handled in the
same way. Their output includes location information.

More changes:

    - Removed the alarm statement and the alarm_hook event.

    - Adapted lots of locations to use the bro_logger, including some
      of the messages that were previously either just written to
      stdout, or even funneled through the alarm mechanism.

    - No distinction anymore between Error() and RunTime(). There's
      now only one class of errors; the line was quite blurred already
      anyway.

    - util.h: all the error()/warn()/message()/run_time()/pinpoint()
      functions are gone. Use the bro_logger instead now.

    - Script errors are formatted a bit differently due to the
      changes. What I've seen so far looks ok to me, but let me know
      if there's something odd.

Notes:

    - The default handlers for the new log_* events are just dummy
      implementations for now since we need to integrate all this into
      the new scripts anyway.

    - I'm not too happy with the names of the Logger class and its
      instance bro_logger. We now have a LogMgr as well, which makes
      this all a bit confusing. But I didn't have a good idea for
      better names so I stuck with them for now.

      Perhaps we should merge Logger and LogMgr?
2011-06-25 16:40:54 -07:00
Robin Sommer
e00e29273a Updating submodule(s). 2011-06-14 21:16:01 -07:00
Robin Sommer
09083b8992 Updating submodule(s). 2011-06-01 11:35:37 -07:00
Robin Sommer
a3b527be4b Updating submodule(s). 2011-06-01 11:30:59 -07:00
Robin Sommer
e0c05868e3 Updating submodule(s). 2011-05-18 09:08:59 -07:00
Jon Siwek
f18951a77e Changes to allow DEB packaging via CPack, addresses #458 2011-05-16 13:51:32 -05:00
Robin Sommer
437ac29ca9 Updating submodule(s). 2011-05-13 17:40:12 -07:00
Robin Sommer
33f1e00264 Updating submodule(s). 2011-05-10 20:57:45 -07:00
Robin Sommer
42a1efa77f Updating submodule(s). 2011-05-10 18:30:05 -07:00
Robin Sommer
ee872c12c8 New bif bro_has_ipv6() to check whether IPv6 support is compiled in. 2011-05-10 18:02:10 -07:00
Robin Sommer
bd9855a380 Merge of Gregor's conn-size branch.
If 'use_conn_size_analyzer' is true, the event engine tracks number of
packets and raw IP bytes per connection. If report_conn_size_analyzer
is true, these values are included as four new columns into conn.log

I changed conn.bro so that the value of report_conn_size_analyzer
follows that of use_conn_size_analyzer. For the new conn.log, we
probably want to get rid of report_conn_size_analyzer anyway.
2011-05-09 17:14:31 -07:00
Robin Sommer
cde6076857 Updating submodule(s). 2011-05-05 21:06:29 -07:00
Robin Sommer
f564023a12 Updating submodule(s). 2011-05-02 11:29:07 -07:00
Robin Sommer
80376653c2 Updating submodule(s). 2011-04-26 21:30:37 -07:00
Robin Sommer
dbecbccdbc Updating submodule(s). 2011-04-21 19:59:49 -07:00
Robin Sommer
f945bd5b7f Updating submodule(s). 2011-04-20 21:33:38 -07:00
Robin Sommer
2bc5e69961 Updating submodule(s). 2011-04-19 15:55:33 -07:00
Robin Sommer
b59a2127db Updating submodule(s). 2011-04-18 12:51:11 -07:00