URL:
https://github.com/SSSD/sssd/pull/5712
Title: #5712: Health and Support Analyzer - Add request log parsing utility
pbrezina commented:
"""
> ```
> (2021-09-21 10:31:47: CID #23: /usr/bin/sh
> - User by ID
> - UID:0@ldap.vm
> - Service by name
> - https
> - Service by name
> - https
> - User by ID
> - UID:0@ldap.vm
> - User by ID
> - UID:0@ldap.vm
> ```
> I would expect the output to only list the timestampe, id and command. There might
be additional parameter to make it more verbose and print the rest of the information.
Alexey suggested to print out this information, because otherwise the `--list` output
does not give any more valuable information than what can be grepped from the NSS
responder log file. I'm fine with either approach.
I'm not saying it shouldn't be available. But there may be thousands of requests
in the logs. Even my small log file from a running machine makes the list unusable. My use
case is "Something screwed up, I am able to reproduce it with id command. Find CID of
the id command that I executed."
So it may be good to also provide minimum input (possibly also provide some limit and
search ability). It may be also good to print command result (success/failure) if
possible.
Note that we can grep our logs, our users often can't. That's why we want to
deliver this tool. But functionality can be always added later, for know we should focus
on making the cli clear and extensible.
> For better usage, it may be good to introduce nested
subcommands:
> ```
> sssctl analyze request list --verbose
> sssctl analyze request show $id [options]
> ```
>
> This is again something that is handled by argparse in python-nutcli and can be
extracted (code is
[
here](https://github.com/pbrezina/python-nutcli/blob/master/nutcli/comman... and
[
here](https://github.com/pbrezina/python-nutcli/blob/master/nutcli/parser...). Or there
are some other alternatives that might be used to create nested commands interface and
already packaged (click perhaps?)
Okay thanks for the pointers, I agree there can be some improvements made here. I'll
look into this.
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5712#issuecomment-924901302