From mh31337@gmail.com Wed Jun 24 08:19:03 2026 From: mh31337@gmail.com To: xymon@xymon.com Subject: cont regex Date: Wed, 18 Nov 2009 22:48:05 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1308990034900731200==" --===============1308990034900731200== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit First off, thanks for coding this amazing piece of software, Henrik. I'm trying to do a http content check of my Netgear print server's web interface. The print server has two ports, and I'd like to have two separate columns that show the status of the two printer ports. I've tried to come up with some regular expressions, but they haven't worked so far. Here's a snippet of the HTML: --------- HTML START ----------
--------- HTML END ---------- I'd like the column color to change if the status of the corresponding printer port does not match the string "On-Line". In this case, I'd prefer if the columns went clear instead of red. I've tried prefixing "cont" with a question mark, but this doesn't work. I'm running 4.2.0. Why is that? I'm hoping you can help me create a regex that will do what I've described. --===============1308990034900731200==-- From andreas.kunberger@itv-denkendorf.de Wed Jun 24 08:19:03 2026 From: andreas.kunberger@itv-denkendorf.de To: xymon@xymon.com Subject: [hobbit] cont regex Date: Thu, 19 Nov 2009 08:44:38 +0100 Message-ID: <4B04F766.6020300@itv-denkendorf.de> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2501699568143655181==" --===============2501699568143655181== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit M. Hansen schrieb: > First off, thanks for coding this amazing piece of software, Henrik. > > I'm trying to do a http content check of my Netgear print server's web > interface. The print server has two ports, and I'd like to have two > separate columns that show the status of the two printer ports. I've > tried to come up with some regular expressions, but they haven't > worked so far. > I'd write a small extension script, which first runs your web page through 'w3m -dump' and then scans in in the resulting text file for your printer lines to send am message to the xymon server mfg Andreas Kunberger -- DITF --===============2501699568143655181==-- From mh31337@gmail.com Wed Jun 24 08:19:03 2026 From: mh31337@gmail.com To: xymon@xymon.com Subject: [hobbit] cont regex Date: Thu, 19 Nov 2009 15:54:32 +0100 Message-ID: In-Reply-To: <4B04F766.6020300@itv-denkendorf.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3172505536926151662==" --===============3172505536926151662== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Thu, Nov 19, 2009 at 8:44 AM, Andreas Kunberger wrote: > I'd write a small extension script, > which first runs your web page through 'w3m -dump' > and then scans in in the resulting text file for your printer lines > to send am message to the xymon server Good idea, but I assume I would have to run the extension script on a box running hobbitclient? The print server is a small embedded device (Netgear PS110), so there's no way I would be able run the extension script locally on the print server. Is it possible to run the script on another box and have the results show up as if they came from the print server? Are you sure it's not possible to just make two different cont tests? My knowledge of regular expressions is quite limited, but I assumed it would be trivial to match those strings. Also, does the cont check parse the raw HTML data or just the text stripped of HTML? I mean, do I have to write a regex like... On-Line\n\n (needs escape characters, I know) ...or... On-Line\s*$ ...in order to match the status of the second port? Thanks! --===============3172505536926151662==-- From bewhite@fellowes.com Wed Jun 24 08:19:03 2026 From: bewhite@fellowes.com To: xymon@xymon.com Subject: [hobbit] cont regex Date: Thu, 19 Nov 2009 09:07:18 -0600 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5688893247964784136==" --===============5688893247964784136== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I have dozens of scripts which run on my hobbit server (using its MIPs, memory, etc.) which report on things all over the network and report them as coming from the hosts being monitored. Just make sure the $MACHINE in the "bb" status command is the monitored host, not the machine running the script. .....Bruce =20 Bruce White Senior Enterprise Systems Engineer | Phone: 630-671-5169 | Fax: 630-893-1648= | bewhite at fellowes.com | http://www.fellowes.com/ =20 =20 =20 Disclaimer: The information contained in this message may be privileged and c= onfidential and protected from disclosure. If the reader of this message is n= ot the intended recipient or an employee or agent responsible for delivering = this message to the intended recipient, you are hereby notified that any diss= emination, distribution or copying of this communication is strictly prohibit= ed. If you have received this communication in error, please notify us immedi= ately by replying to the message and deleting it from your computer. Thank yo= u. Fellowes, Inc. =20 -----Original Message----- From: M. Hansen [mailto:mh31337 at gmail.com]=20 Sent: Thursday, November 19, 2009 8:55 AM To: hobbit at hswn.dk Subject: Re: [hobbit] cont regex On Thu, Nov 19, 2009 at 8:44 AM, Andreas Kunberger wrote: > I'd write a small extension script, > which first runs your web page through 'w3m -dump' > and then scans in in the resulting text file for your printer lines to > send am message to the xymon server Good idea, but I assume I would have to run the extension script on a box running hobbitclient? The print server is a small embedded device (Netgear PS110), so there's no way I would be able run the extension script locally on the print server. Is it possible to run the script on another box and have the results show up as if they came from the print server? Are you sure it's not possible to just make two different cont tests? My knowledge of regular expressions is quite limited, but I assumed it would be trivial to match those strings. Also, does the cont check parse the raw HTML data or just the text stripped of HTML? I mean, do I have to write a regex like... On-Line\n\n (needs escape characters, I know) ...or... On-Line\s*$ ...in order to match the status of the second port? Thanks! To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk --===============5688893247964784136==--
  Parallel Port 1

Parallel Port 2

    Port Name P1 P2
    Status On-Line Offline
    Print State Idle Idle