I have a blade chassis that I want to be able to fetch the power budget stats from it's web inteface, however this data i'm unable to fetch using SNMP, i've checked ;)
however I should be able to crawl the management web interface for this data, by just initiating a login, fetch the HTML page the grep out the proper fields.
Any ideas?
If you are going to write a crawler, investigating Perl's Mechanize package, or your programming language de jour's version, would probably make life a lot easier.
These packages provide cookie and session management functions. Also, in Python, when combined with the BeautifulSoup package, it can be quite powerful.
Does the blade chassis have a telnet interface? A suprising number of switches and routers do, and it's usually easy to script a telnet connection.
I have scripted HTTP connections to get data, but it can be a pain if the server uses cookies or session IDs to manage the authentication.
John Rennie
This isn't great from a performance perspective. I wouldn't try to grab the metrics at really short intervals.
However, you could use wget or curl to perform this task then grep the output for the values you need.
Remember that if you update the firmware of the device you might have a broken script if they change the UI at all.