Implemented the next roadmap step: direct Graylog MCP replay with temporary baselines.
This commit is contained in:
@@ -54,12 +54,12 @@ class GraylogStreamSource:
|
||||
if not isinstance(self.mapping, dict):
|
||||
raise RuntimeError("invalid_graylog_field_mapping")
|
||||
|
||||
def fetch(self, *, max_events: int = 5_000) -> tuple[list[LogEvent], dict[str, object]]:
|
||||
def fetch(self, *, max_events: int = 5_000, range_seconds: int = 300) -> tuple[list[LogEvent], dict[str, object]]:
|
||||
status = self.client.probe()
|
||||
mapping_fields = [str(value) for value in self.mapping.values() if isinstance(value, str)]
|
||||
arguments: dict[str, object] = {
|
||||
"query": self.query,
|
||||
"range_seconds": 300,
|
||||
"range_seconds": max(1, int(range_seconds)),
|
||||
"fields": list(dict.fromkeys([*DEFAULT_FIELDS, *mapping_fields, *self.profile_fields])),
|
||||
}
|
||||
if self.stream:
|
||||
|
||||
Reference in New Issue
Block a user