-
Notifications
You must be signed in to change notification settings - Fork 232
Add tarball integration for local and SSM calling #1745
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
base: feature/DebuggerTool
Are you sure you want to change the base?
Conversation
if len(os.Args) > 1 { | ||
switch os.Args[1] { | ||
case "--tarball": | ||
debugger.CreateTarball(false) | ||
return | ||
case "--tarballssm": | ||
debugger.CreateTarball(true) | ||
return | ||
} | ||
} | ||
|
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.
should use flag package instead
EnvironmentChangeDesc string | ||
} | ||
|
||
func Triage() Answers { |
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.
lol, great name
internal/debugger/tarball.go
Outdated
tarWriter := tar.NewWriter(gzipWriter) | ||
defer tarWriter.Close() | ||
|
||
if err := addFileToTarball(tarWriter, paths.AgentLogFilePath, "logs/amazon-cloudwatch-agent.log", 500); err != nil { |
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.
why? we should include all of it
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.
Going to go up to 50,000 lines, this attributes to about ~800KB-2MB of compressed data.
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.
Also going to add an option for customers to turn on debug mode for logging and wait for some x
seconds of gathering those logs before they get gathered and grouped to the tarball.
|
||
fmt.Println("Please answer these questions to better assist with your issue:") | ||
|
||
fmt.Println("Is this issue once off, intermittent, or consistently happening right now? (o/i/c): ") |
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 would let them write anything, give us as much info as possible
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.
True, I'll add a section to let them write anything they want. FYI this section is a WIP with the support team. They're going to request some more questions to be added here in the future.
answers.Occurence = strings.TrimSpace(occurence) | ||
} | ||
|
||
fmt.Print("Has anything changed in the environment recently? (y/n): ") |
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.
same thing. we should let them share when it changed, etc by just letting them type whatever.
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.
If the user says yes they have the opportunity to write about what did change after.
This PR was marked stale due to lack of activity. |
Description of the issue
A common pain point of customers when cutting a ticket is gathering information regarding their agent for the support team. They must sift through their agent, gather relevant files, and provide them to the support engineer. Adding a feature to gather all necessary files and compress them allows users to provide support engineers with relevant context through one command.
Description of changes
It is not possible to provide the triaging interactivity if the agent tarball generator is called via SSM, so if the agent detects that it is being called through SSM, it will not ask for triaging.
Output
The tarball will have the following structure:
If SSM is used, the tarball will not have the
triaging.txt
file.License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.