cont regex

M. Hansen mh31337 at gmail.com
Wed Nov 18 22:48:05 CET 2009


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 ----------
<table width="530" height="230" border="0" cellpadding="0"
cellspacing=0 bgcolor="#ffbe39">
<div class="maintab">
<tr>

 <td> </TD>
 <th nowrap align="left">Parallel Port 1<p></th>
 <th nowrap align="left">Parallel Port 2<p></th>
</tr>

 <tr><td nowrap>    Port Name</td>
 <td nowrap>P1</td>
 <td nowrap>P2</td>

 </tr>
 <tr><td nowrap>    Status</td>
 <td nowrap>On-Line</td>
 <td nowrap>Offline</td>

 </tr>
 <tr><td nowrap>    Print State</td>

 <td nowrap>Idle</td>
 <td nowrap>Idle</td>
--------- 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.



More information about the Xymon mailing list