Add the ability to pull logs between dates/times
@alicia1066 is already working on this.
Since Dec 9, 2022.
- Dominant language
- Go
- Stars
- 58
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
What problem would you like to address?
When investigating an issue that occurred in the past, it would be helpful to be able to pull just the logs for the timeframe of the issue. Currently, we are only able to use the -include flag to go back hours and as a result we may collect way more data than we need.
Who is the audience for this request?
HashiCorp customers
Which HashiCorp products does this affect?
I am asking for Consul, but I am sure all runtime products would find this helpful.
What would the ideal solution look like?
Something like:
hcdiag -consul -include-between 24h 72h
OR
hcdiag -consul -include-start_dt-end_dt 2022-12-09-13:30 2022-12-09-15:30
What alternatives have you considered?
Using hcdiag to pull as far back as necessary and manually run a command to pull the data from the files hcdiag created for the desired dates, and write into a new file.
How does this impact you?
If an issue happened further in the past (i.e 14 days), using the -include flag to go as far back as needed would result in a very large file and provide a lot more information than is necessary. It takes longer to run and it is more difficult to move around larger files.
What are the customer data privacy implications for this request?
This doesn't change the data hcdiag already pulls, it just limits it. It would mean that there would be less redaction a customer would need to do if we are limiting the data to just the dates/times needed.
Are there any deadlines?
No
Is there any additional context?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.