I have some power connect switches and I use MRTG to monitor them, though I noticed that if I plug a new server into one of the switches MRTG does not update to display this.
for example I just plugged a server into port 21 and my graphs still don't show port 21.
it does not show pu up in the folder nor in my index.
any ideas?
is there a way I Can add this without loosing all historical data?
thanks.
Luma
The way to fix this is to run a periodic poll of the switch and auto-generate your MRTG configs. There is a key utility that comes with MRTG that's called cfgmaker. This is a utility that will auto-generate pages based on data it pulls out of a target's SNMP data. The key is to name your pages after the interfaces and populate any descriptive names in the page itself. This way the same interface will keep its name no matter what's plugged into it.
Once you have all that, you can couple that with indexmaker to build a dynamic key for your site. But the cfgmaker and indexmaker calls into a single script and run that script on whatever schedule suits you, and it'll just make new pages as it finds them. It works pretty good, I was using MRTG to track certain server-based statistics back in the day and had a swank .bat file that generated it all.
You can get really complex with these with regards to formatting, but if you just want defaults something like this might be all you need:
Just run something like that on a schedule. Adjust to taste.