Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,10 @@ std::string classify_unknown_auth_pattern(const Event& event) {
return "sshd_timeout_or_disconnection";
}

if (message.starts_with("Unable to negotiate with ")) {
return "sshd_negotiation_failure";
}

return "sshd_other";
}

Expand Down
12 changes: 6 additions & 6 deletions tests/test_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,9 @@ void test_syslog_fixture_matrix_file() {
expect(result.quality.top_unknown_patterns[2].pattern == "pam_unix_other",
"expected unsupported pam_unix syslog bucket");
expect(result.quality.top_unknown_patterns[2].count == 1, "expected one unsupported pam_unix syslog line");
expect(result.quality.top_unknown_patterns[3].pattern == "sshd_other",
"expected unsupported sshd syslog bucket");
expect(result.quality.top_unknown_patterns[3].count == 1, "expected one unsupported sshd syslog line");
expect(result.quality.top_unknown_patterns[3].pattern == "sshd_negotiation_failure",
"expected sshd negotiation-failure syslog bucket");
expect(result.quality.top_unknown_patterns[3].count == 1, "expected one sshd negotiation-failure syslog line");
}

void test_journalctl_fixture_matrix_file() {
Expand Down Expand Up @@ -759,9 +759,9 @@ void test_journalctl_fixture_matrix_file() {
expect(result.quality.top_unknown_patterns[2].pattern == "pam_unix_other",
"expected unsupported pam_unix journalctl bucket");
expect(result.quality.top_unknown_patterns[2].count == 1, "expected one unsupported pam_unix journalctl line");
expect(result.quality.top_unknown_patterns[3].pattern == "sshd_other",
"expected unsupported sshd journalctl bucket");
expect(result.quality.top_unknown_patterns[3].count == 1, "expected one unsupported sshd journalctl line");
expect(result.quality.top_unknown_patterns[3].pattern == "sshd_negotiation_failure",
"expected sshd negotiation-failure journalctl bucket");
expect(result.quality.top_unknown_patterns[3].count == 1, "expected one sshd negotiation-failure journalctl line");
}

} // namespace
Expand Down
Loading