On 20/08/2013 15:02, Natxo Asenjo wrote:
hi,

for a nagios (monitoring system) check I need to scrape a web site
(this is for a network device, a UPS, whatever). This particular
device only offers some functionality through a web interface.

I am only interested in the text '1 Critical Alarm PresentA site
wiring fault exists'; is it possible to match this is a simple way (in
fact, the text after 'Critical Alarm Present' may vary, it would be
awesome to be able to get that easily. Otherwise I am afraid I will
have to start parsing html with HTML::TableExtract

Parsing the HTML is absolutely the right way to do this. It's not that
hard. If you put a sample of the HTML up (perhaps on pastebin?) then
someone will code it for you. Better that way than writing some
unreliable regular expression that may fail one day with a text string
you haven't thought of, or an update to the device firmware.

Rob


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to