-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Live-tail implementation #9636
Comments
smilu97
added a commit
to pinpoint-apm/pinpoint-grpc-idl
that referenced
this issue
Aug 23, 2023
smilu97
added a commit
to pinpoint-apm/pinpoint-grpc-idl
that referenced
this issue
Aug 23, 2023
smilu97
added a commit
to smilu97/pinpoint
that referenced
this issue
Aug 24, 2023
smilu97
added a commit
to smilu97/pinpoint
that referenced
this issue
Aug 24, 2023
smilu97
added a commit
that referenced
this issue
Aug 25, 2023
smilu97
pushed a commit
to smilu97/pinpoint
that referenced
this issue
Nov 2, 2023
smilu97
pushed a commit
to smilu97/pinpoint
that referenced
this issue
Nov 3, 2023
smilu97
pushed a commit
that referenced
this issue
Nov 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Live Tail
The purpose of the live-tail feature is to literally pull the logs that have just been generated from a specific file on the target host up to the web in real time. In order for the user to use the live-tail feature, the telegraf agent's execd output plugin must be used to connect to the grpc agent provided by pinpoint, which will send logs only when needed in response to signals from the pinpoint collector. The logs sent from the pinpoint output are delivered to the web via the redis pub/sub channel.
FileKey Identifier
Every single log files must have their own unique identifier, which is called
FileKey
A
FileKey
consists of three pieces: HostGroupName, HostName, and FileName. The HostGroupName and FileName must be determined by the user, while the HostName is determined by the pinpoint agent, which is the same as the result of/bin/hostname
.The
FileKey
s are usually serialized with this format,{{HostGroupName}}:{{HostName}}:{{FileName}}
in Pinpoint, and it can be found at the redis with the keys belowlog:files:*
Redis usages
The collector should periodically save the registered FileKeys to the Redis value store so that the web knows which FileKeys are currently available.
Once the web has informed users of the FileKeys available to them, then users can specify which FileKey is associated with the file they want to read, and request corresponding live-tail.
Collectors are always listening to those kind of requests via Redis subscribe, and at least one of the collectors must be able to response to the live-tail request. The response must be sent via Redis publish, and received by web via Redis subscribe also at this time.
Web API Specifications
Getting all HostGroupNames
This API returns all distinct HostGroupNames of FileKeys which is registered to the Pinpoint.
Response example
Getting Hosts of a HostGroup
This API returns the FileKeys by the HostGroupName in path variable
Response example
Live Tail WebSocket API
This API sends the log in real time through WebSocket connection.
Response example
The text was updated successfully, but these errors were encountered: