mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

- Metrics API is much more similar to the Logging framework's API now. - Filters define all output and metrics collection now. - Initial attempt at thresholding and generating notices.
22 lines
No EOL
398 B
Text
22 lines
No EOL
398 B
Text
|
|
|
|
redef enum Metrics::ID += {
|
|
SSL_SERVERNAME,
|
|
};
|
|
|
|
event bro_init()
|
|
{
|
|
Metrics::add_filter(SSL_SERVERNAME,
|
|
[$name="no-google-ssl-servers",
|
|
$pred(entry: Metrics::Entry) = {
|
|
return (/google\.com$/ !in entry$index);
|
|
},
|
|
$break_interval=10secs
|
|
]);
|
|
}
|
|
|
|
event SSL::log_ssl(rec: SSL::Info)
|
|
{
|
|
if ( rec?$server_name )
|
|
Metrics::add_data(SSL_SERVERNAME, [$index=rec$server_name]);
|
|
} |