Add a configurable TimeSpan parameter for Get-ClusterLog to limit log collection duration

Open Beginner friendly
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
powershell
Domain
tooling

Research direction

Open SQLLogScoutCoreModule.psm1 and inspect the Get-ClusterInformation() function, starting at its Get-ClusterLog call. Make the collection duration configurable with a default of 15 days using -TimeSpan 21600, then verify that Get-ClusterLog no longer retrieves the full log history by default.

Written by the indexing model from the issue text.

Description

In the file SQLLogScoutCoreModule.psm1, in the GetClusterInformation() function, there is a call to Get-ClusterLog.
By default, it retrieves all existing logs.
This can represent several GB or even tens of GB of logs and takes a long time when stopping LogScout.
Would it be possible to turn this into a parameter, with a default limit of, for example, 15 days, using -TimeSpan 21600?
We had to make this modification before running LogScout in production, as our logs are simply too large not to filter them.

Dominant language
PowerShell
Stars
117
Forks
33
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/SQL_LogScout

All issues in microsoft/SQL_LogScout

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.