Added wrong password metrics for Minetest.

This commit is contained in:
Christian P. MOMON 2023-05-07 10:45:45 +02:00
parent c1adf8e650
commit 4a0ac7b2df
2 changed files with 6 additions and 0 deletions

View file

@ -163,9 +163,14 @@ public class MinetestLogAnalyzer
// metrics.metaverse.logs.error // metrics.metaverse.logs.error
// metrics.metaverse.logs.none // metrics.metaverse.logs.none
// metrics.metaverse.logs.unknown // metrics.metaverse.logs.unknown
// metrics.metaverse.wrongpassword
if (log.getLevel() == MinetestLogLevel.ACTION) if (log.getLevel() == MinetestLogLevel.ACTION)
{ {
this.counters.inc("metrics.metaverse.logs.action", year, yearMonth, yearWeek, date); this.counters.inc("metrics.metaverse.logs.action", year, yearMonth, yearWeek, date);
if (log.getMessage().endsWith(" supplied wrong password (auth mechanism: SRP)."))
{
this.counters.inc("metrics.metaverse.wrongpassword", year, yearMonth, yearWeek, date);
}
} }
else if (log.getLevel() == MinetestLogLevel.WARNING) else if (log.getLevel() == MinetestLogLevel.WARNING)
{ {

View file

@ -75,6 +75,7 @@ public class MinetestProber
// metrics.metaverse.logs.error // metrics.metaverse.logs.error
// metrics.metaverse.logs.none // metrics.metaverse.logs.none
// metrics.metaverse.logs.unknown // metrics.metaverse.logs.unknown
// metrics.metaverse.wrongpassword
result = MinetestLogAnalyzer.probe(logs); result = MinetestLogAnalyzer.probe(logs);
// metrics.service.database.bytes // metrics.service.database.bytes