fix mcp
This commit is contained in:
@@ -46,7 +46,19 @@ class GraylogStreamSource:
|
||||
raise RuntimeError("invalid_graylog_field_mapping")
|
||||
|
||||
def fetch(self, *, max_events: int = 5_000, range_seconds: int = 300) -> tuple[list[LogEvent], dict[str, object]]:
|
||||
status = self.client.probe()
|
||||
try:
|
||||
status = self.client.probe()
|
||||
except RuntimeError as exc:
|
||||
return [], {
|
||||
"status": "error",
|
||||
"source": "graylog_mcp",
|
||||
"events_fetched": 0,
|
||||
"pages": 0,
|
||||
"partial": True,
|
||||
"error": f"probe_error: {exc}",
|
||||
"truncated": False,
|
||||
"latest_event_time": "",
|
||||
}
|
||||
mapping_fields = [str(value) for value in self.mapping.values() if isinstance(value, str)]
|
||||
arguments: dict[str, object] = {
|
||||
"query": self.query,
|
||||
|
||||
Reference in New Issue
Block a user