Is there a way for me to scan each interface on a switch for specific commands and to report which interfaces are missing said commands?
You may need to alter your search config block rule. It would need to look something like the below which would search for your rules on each individual interface and then alert when it does not find it and give you the interface that is failing.
Here is an example violation that uses a config block filter similar to that one above. If you click on the plus sign it will tell you what commands were found and what were not found.
That would be a task for the compliance reports. You'll find a lot of information here on thwack about compliance reports/policies/rules.
I've created a rule to match strings and applied that rule to a policy then that policy to a report. I've pasted a screenshot below. When a report is ran and it notes the violations it notes both strings found and not found but also does not notify which interfaces or lines are in violations. Is there a more specific way I can go about getting the information I need?
Thank you very much! That looks to have done the trick.
I have an additional question. I've attached a screenshot as well. When testing the config I get the output stating which lines and interfaces are in violation, but when I run the report including the policy and rule it just states that it is violated with no details. Is there a way to get the report to list the same detailed information?
Ok I see what is happening I think. The way you have you rule set up is that it checks each one individually. If you want to be alerted for all at once if they are present or not present try to remove all of the parentheses "(" or ")" from the rule. You could leave the one before the start and the one at the very end as well, but either way that should show all of the rules. If they are not showing up in there that means the specified string is present I think.
I'm not too sure but I think there aren't any "(" ")" on the rule at all unless there's some sort of implied one that I'm not aware of yet.
Oh I see, sorry I though it was for the same rule that you had in the original image. From the more recent one I think it should be working as intended. You can try to change your rule to this for regular expression and see if that will help get it to show up correctly.
^mab[\r\n]*$