-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Infra UI] Add graphql query to retrieve log entries from a configured source #21306
[Infra UI] Add graphql query to retrieve log entries from a configured source #21306
Conversation
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
958cc9d
to
2b4981c
Compare
💚 Build Succeeded |
@skh while implementing the follow-up that uses the api I came up with a structure for the query type that is better suited for the way it is going to be used. Hope that doesn't throw your review off - the change quite superficial 😇 I combined |
💔 Build Failed |
💚 Build Succeeded |
258fae0
to
a184527
Compare
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm the example queries work and the data returned looks good to me, 👍 from me.
I'll wait for #21871 to be merged so I can resolve the conflicts in the generated types here. |
a184527
to
514137f
Compare
💔 Build Failed |
looks like an unrelated error in the region map tests again |
New GraphQL field
InfraSource.logEntriesAround()
The new
logEntriesAround()
field of theInfraSource
type allows for retrieval of a chunk of consecutive log entries preceding and following a certain position in the event stream.Example
New GraphQL field
InfraSource.logEntriesBetween()
The new
logEntriesBetween()
field of theInfraSource
type allows for retrieval of a chunk of consecutive log entries between two positions in the event stream (exclusively).Example
New
InfraLogEntriesDomain
libInfraLogEntriesDomain
is a domain lib, that provides methods to retrieve log entries given a source id, time information, filters and highlights. In the Kibana server it is currently backed by theInfraKibanaLogEntriesAdapter
, which retrieves events from the Elasticsearch cluster that the Kibana instance belongs to.Built-in message formatting
The domain lib mentioned above comes with a set of built-in rules to derive a
message
from a few message document types:system.syslog.message
as produced by the filebeat system modulesystem.auth.message
as produced by the filebeat system modulemessage
as produced by plain filebeat@message
as produced by popular logstash configurationsThis list of rules will be expanded and made extensible by the user. The rules are currently specified in a small declarative DSL as described in #21204 and compiled at runtime to a composite javascript formatting function.
Testing
For manually testing the new queries the GraphiQL interface at
/api/infra/graphql/graphiql
can be used.