Last active
December 21, 2015 13:53
-
-
Save JustinAzoff/3448fedc1140ab8eb7e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @load base/protocols/http | |
| @load base/protocols/ssh | |
| event connection_established(c: connection) | |
| { | |
| statsd_increment("bro.connection.established", 1); | |
| } | |
| event connection_rejected(c: connection) | |
| { | |
| statsd_increment("bro.connection.rejected", 1); | |
| } | |
| event HTTP::log_http(rec: HTTP::Info) | |
| { | |
| local size = rec$response_body_len; | |
| statsd_increment("bro.http.requests", 1); | |
| statsd_increment("bro.http.bytes", size); | |
| local s = fmt("bro.http.status_code.%d", rec$status_code); | |
| statsd_increment(s, 1); | |
| } | |
| event SSH::log_ssh(rec: SSH::Info) | |
| { | |
| local s = fmt("bro.ssh.login.%s", rec$auth_success); | |
| statsd_increment(s, 1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment