Mark failed switches as unavailable, rather than removing whole page
Creates web pages that show information about Ethernet switches.
Brought to you by:
siemsen
Recently had a switch fail, Switchmap removed it's .html file as it couldn't access it. Having access to that file would have been valuable in our recovery (to know what was patched where). Could Switchmap mark entire switches as 'inactive' for X days rather than remove the page, like it does for inactive hosts?
Anonymous
+1 for this please
I can see how it might be useful to have the old files. It makes sense to keep them around for X days, as long as I'm careful about it. Like, I don't think we want "search" to find them. Suppose you rename an existing switch. Then "search" would find hits in the new and the old files, which could be confusing.
Currently, switchmap deletes the files in the output directory, if any, then creates the new files. Suppose that instead of deleting them, I move them to a directory named "old", and I also delete any files in the "old" directory that are older than X days. The "X" will be a new variable in ThisSite.pm, which will have an initial value of, like, 7.
Then I suppose you want an index file for the "old" directory, and a link to the index file on the main page.
How does that sound? You won't be able to search the "old" files, but you will be able to view them and use your browser's "find in page" function.
Yes, that would be fine. The key thing is the have the data available. Perhaps a tab on the main interface that was 'history' or 'the view one week ago' or whatever, but the key thing is to have the data available somehow ;)