-
Notifications
You must be signed in to change notification settings - Fork 284
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
Cisco spanning tree add options to select interface and status #780
Comments
I agree! |
Hi there, We skip disable port by design, and also we consider as OK if spt state is disabled. What would you want to change about the following rules :
@nailyk-fr you would wish to override some of the mapping spt state -> status described above ? Regards |
thanks for fastiness. P.S. am trying to change the plug-in, and guess the hardest part will be to retrieve the custom values. |
Then you want to catch state transitions ? Or gain flexibility about status and ports (I assume 21: and 22: corresponds to a port number right ?) ? This plugin should be refactor with the new counter template class anyway. You may want to get some example with the bgppeerstate.pm which is probably close from what you try to achieve. |
Exactly. Catch status transition. Am not able to help you on the plugin rewrite. Is it ok if I add this functionality on the old plugin anyway ? |
We would prefer that you propose a PR according refactoring, but as we miss some time if your change keep backward compatibility with existing check (adding instead of breaking/changing, especially options) we may merge it of course. |
As it is the first time am doing perl I prefer not do a PR (PR on github cannot be modified by other people than author). Also my time at work dedicated on this is over. Here is the not-well-written-patch: toto.txt Do not handle 'disabled' port yet (will still be skipped). Usage:
Hope it is fine. |
Hey @nailyk-fr Thanks for the patch, do not hesitate to do PR, even if they are rejected it is more readable and we can discuss about the way of implementing such feature. I refactored the code. You should be able to filter on port and have no limit in overriding status. I have also added ability to filter on port description and enhance globally the output. I'll merge my PR and it will then close this issue. Thanks for you contribution ! |
Refactor and enhance spanning tree common mode #780
Thanks for the work @Sims24 ! Original patch add custom topology like Hope it is clear, am not good at all at English writing.... Should I open a PR with adding this option again ? |
No problem. Filter port is just an "extra" I could easyly add during the refactoring. But to achieve what you want you can use the code of my PR. You command would looks like below :
This way, any port in a blocking / broken state will trigger a critical except the port with 21 index. That way of defining options let us handle any custom topology regarding spanning tree What dou you think about it ? |
Sadly I already did the PR ( #912 ) with the Am not sure to understand your way. |
I'll close it but it's always interesting to see how other would handle such feature. We know this is harder at first sight but this is also more reliable and flexible. Practice a little and it will become simpler and simpler. |
@Sims24 thanks for taking care of my requests and guiding me. |
For Cisco spanning tree, add the possibility to select interface with spanning tree and an option/filter to overwrite status.
For example, we can disable a network interface on a switch to prevent loop. So it is normal that this network interface is down on a switch.
The text was updated successfully, but these errors were encountered: