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

New Validator: Identify rule usage to detect unused rules #51

Open
moshekaplan opened this issue Mar 28, 2023 · 0 comments
Open

New Validator: Identify rule usage to detect unused rules #51

moshekaplan opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@moshekaplan
Copy link
Owner

From https://www.reddit.com/r/paloaltonetworks/comments/11zjzdq/python_script_for_analyzing_panorama_configuration/ :

good addition to this might be identifying redundant rules, shadowed rules, or rules that aren’t shadowed but still have no hit count.

I was hoping to integrate the hit count data so I could mimic how I use policy optimizer to find rules that are deletion candidates. Something like displaying a list of all rules never since since they were created x years ago, and all rules that were once used, but have not been used for duration y.

If there's an efficient way to collect that data, I'm game to try, but it seems like the only way would be to dump all hit counts from all devices in a device group, then iterate through the rules in the device group and seeing when they were created, last reset and last hit. Could be at one request per device per rule type, it's still realistic, but would add a pretty significant amount of runtime in the initial data collection. OTOH it could probably be implemented to only run if the rule "lifespans" (x and y mentioned before) are set, so only users interested in the functionality would have the runtime cost.

@moshekaplan moshekaplan added the enhancement New feature or request label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant