Skip to content
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

ausearch: add option to exclude by message type #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Jan 8, 2024

Similar to the existing option -m, which searches by the given message type(s), add the option -M to exclude by the given message type(s).

@stevegrubb
Copy link
Contributor

We could search by negating virtually any of the search criteria. I wonder if it would be more useful to add --negate and do it to everything? Is there a practical use to removing just one particular event type and selecting all others?

Also, -m supports lists. ausearch -m DAEMON_START,DAEMON_END,SYSTEM_BOOT,SYSTEM_SHUTDOWN,SYSTEM_RUNLEVEL,SERVICE_START,SERVICE_STOP

Would the -M option do the same thing?

@cgzones
Copy link
Contributor Author

cgzones commented Jan 15, 2024

Also, -m supports lists. ausearch -m DAEMON_START,DAEMON_END,SYSTEM_BOOT,SYSTEM_SHUTDOWN,SYSTEM_RUNLEVEL,SERVICE_START,SERVICE_STOP
Would the -M option do the same thing?

Yes, since it reuses the same parsing logic.

Is there a practical use to removing just one particular event type and selecting all others?

It seems useful while already filtering by a custom key, to reduce the shown events.

Similar to the existing option `-m`, which searches by the given message
type(s), add the option `-M` to exclude by the given message type(s).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants