Skip to content

Instantly share code, notes, and snippets.

@JustinAzoff
Last active December 21, 2015 13:53
Show Gist options
  • Select an option

  • Save JustinAzoff/3448fedc1140ab8eb7e0 to your computer and use it in GitHub Desktop.

Select an option

Save JustinAzoff/3448fedc1140ab8eb7e0 to your computer and use it in GitHub Desktop.
@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