GithubHelp home page GithubHelp logo

nl-cristi / logcatcher Goto Github PK

View Code? Open in Web Editor NEW
17.0 6.0 7.0 496 KB

Tool to help collection of logs

License: MIT License

PowerShell 100.00%
powershell iis iis-server iis-site logs microsoft logcatcher troubleshooting

logcatcher's Introduction

Escalation Engineer at ControlUp who likes learning tech.

In my spare time i am balancing "mada mada dane" and "ichigo ichie" πŸ˜„

πŸ‘¨πŸΌβ€πŸ’» building SoftwareMechanic for my ideas

🌱 cooking with my wife

🧠 learning golang, rust, python

🧠 learning how to neovim --> PDE using kickstart from TJ DeVries

πŸ’œ loving Blazor, AspNet, csharp, WinDbg, PerfView, SysInternals

🏑 website | πŸ“Ί cooking | 🐦 twitter | πŸ“° newsletter | πŸ‘” linkedin

bg

logcatcher's People

Contributors

crnegule avatar nl-cristi avatar nt-7 avatar rogheorg avatar sofiaestrela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

logcatcher's Issues

Feature request - IIS UI add-in

That would be great to be able to right click a site (and even at application level) on IIS and start LogCatcher from context menu.

List available SPNs

Hi there

SPNs are a important component on windows that create impact on a successful authentication workflow when using Windows Integrated Authentication. It Would be nice to Have a Feature to List all the SPNs.

GetWebSites errors out

Clicking GetSites button in UI spits the following error in the PS console.
On a pristine IIS installation.

Cannot convert argument "c", with value: "@{id=1; state=Started; name=Default Web Site;
applicationPool=DefaultAppPool; enabledProtocols=http; physicalPath=%SystemDrive%\inetpub\wwwroot}", for "AddRange" to​
type "System.Collections.ICollection": "Cannot convert the "@{id=1; state=Started; name=Default Web Site;​
applicationPool=DefaultAppPool; enabledProtocols=http; physicalPath=%SystemDrive%\inetpub\wwwroot}" value of type​
"Selected.Microsoft.IIs.PowerShell.Framework.ConfigurationElement" to type "System.Collections.ICollection"."​
At F:\Downloads\LogCatcher\LogCatcher\General\Functions.ps1:274 char:5​

  • $arrproc.addrange($CurrentSites)​
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
    
    • CategoryInfo : NotSpecified: (:) [], MethodException​
    • FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

[Feature Request] Get logs from specific day

Not sure how doable it is, but it would be a nice addition to have a flag specifying a specific date for which you would like to collect the logs, in case of installations where large files are produced, and the issue you are interested in occurred a while ago.

Or in alternative, if easier to implement, a way to say logs between 20 and 19 day ago, for example.

Add flag to force FREB collection

Given that the amount of generated FREBS is limited, sometimes we disable Failed Request Tracing as soon as the issue we are trying to analyze happens in order for it to not be overwritten.

In those scenarios, when we run LogCatcher since they are disabled for the selected websites they are not automatically collected, and have to be zipped and collected separately.

For those scenarios it would be useful to have a flag to force FREB collection regardless of it being enabled or not for any given site.

As far as can see it could have two approaches:

  1. -ForceFrebCollection $true and ignore whether the flag is set or not at the site level and try to collect
  2. -FrebCollectionSiteIds 2,3 and specify for which sites we want to ignore the flag, as for customers with large installations there could be a large overhead in trying to collect for all of them.

HttpERR logs do not respect the MaxDays parameter

The collection of the HttpERR logs is not respecting the Logs Age parameter, which can lead to gigabytes of files being collected in older servers which can severely slow down the process.

Looking at the code for the http error logs operation

https://github.com/cristian-clamsen/LogCatcher/blob/96ab07cffb25f8efdcfca384e2d1679cad85b4ee/LogCatcher/General/CatchFilteredIISzip.ps1#L41-L45

I would assume that a quick fix would be to add the /maxage:$MaxDay similar to the operation bellow that catches the iis logs

https://github.com/cristian-clamsen/LogCatcher/blob/96ab07cffb25f8efdcfca384e2d1679cad85b4ee/LogCatcher/General/CatchFilteredIISzip.ps1#L33-L37

If you would like let me know, and I can test it and open a PR

Create reports that shows events and logs grouped By the use case by timeframe

Hi there

When troubleshooting different use cases the common sources of that that we search for, currently is separated and in different folders, organized by the location where that information exists.

It would be useful to have a report that could shown the main useful information that happen in a timeframe that we could set in the
UI grouped by troubleshooting use case.

Authentication Report .txt:
| Time Frame | source | Count | Event Ids | Error Codes | Details |
| 12h00-13h00 | Event Log Lsa | 3 | YYYY, XXXX, | | < event message >
| 12h00 - 13h00 | Event Logs Kerberos | 4| AAAA, BBBB| | < event message >
| 12h00 - 13h00 | FREB Logs | 3 | | 401.2 | Request Summary with URL, App Pool, Authentication
| 12h00 - 13h00 | Http Err | 3 | | 403 | http response message

Crash Reports.txt:
| Time Frame | source | Count | Error Codes |
| 11h00-13h00 | Event Log WAS | 3 | YYYY, XXXX, |
| 11h00 - 13h00 | IIS Logs | 100 | 500 |

Currently we have different sources of information: Event Logs , IIS Logs, Freb Logs, Http Err Logs. For each entry that we find that is a error or warning we could increment the count, collect the Event ID and the Error Code/Status Code.

To not impact the time we take to collect all the data , this reports could be generated only by the person that is troubleshooting the issues. For this it could exist a button that could represent the trigger to generate such reports.

With this information we could easily identify i which time frame we had the main errors that we are looking for depending on the use case, such as Authentication or Crashing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.