What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Monitor value on a html site

Votes:

0

Is it possible to monitor one Value of a website and display it as a channel? I already tried HTTP Advanced, but it only gives me the possibility it value is not found or is found. I also tried XML/REST but I cannot find a node to monitor.

Can someone help?

html value website

Created on Jun 16, 2015 10:06:25 PM



Best Answer

Accepted Answer

Votes:

0

Not really, but it should work using Invoke-Webrequest and the following regex:

<td[^>]*>(\d+.\(\d+\))<\/td>

It will extract "225 (225)". Should be easy with PowerShell :)

Created on Jun 17, 2015 9:54:55 AM by  Stephan Linke [Paessler Support]



8 Replies

Votes:

0

This can be done with the HTTP Content Sensor, but the value
has to be within brackets, for example [21].

Created on Jun 17, 2015 8:32:17 AM by  Stephan Linke [Paessler Support]

Last change on Jun 17, 2015 8:32:35 AM by  Stephan Linke [Paessler Support]



Votes:

0

Okay, the value doesn't have values in Brackets. So do I need a custom script to monitor the values?

The html Code looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
	xml:lang="en">
  <head>
    <title>Attensity Respond - Server Administration</title>
    <link href="favicon.ico" rel="SHORTCUT ICON">
    <link type="text/css" href="xm.css" rel="stylesheet">
    <meta content="0" http-equiv="Expires">
    <meta content="no-cache" http-equiv="Pragma">
    <meta content="no-cache" http-equiv="Cache-Control">
    <script src="scripts.js"></script>
  </head>

  <body>
    <div class="title">
      &nbsp;Server Verwaltung
    </div>

    <div class="section">
      <div class="toolbar">
        <h2>Server-Informationen</h2>
      </div>
      <table>
      
      <tr>
        <td class="nowrap"><span class="verdana_11_bold">Anwendung:</span></td>
        <td width="50%">Attensity Respond Server</td>
        <td class="nowrap"><span class="verdana_11_bold">Freier Speicher:</span></td>
        <td width="50%">528.702.968 bytes</td>
      </tr>
      <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Versionsnummer:</span></td>
        <td>6.4.0.14</td>
        <td class="nowrap"><span class="verdana_11_bold">Speicher gesamt:</span></td>
        <td>1.877.999.616 bytes</td>
      </tr>
      <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Interne Revisionsnummer:</span></td>
        <td>1006</td>
        <td class="nowrap"><span class="verdana_11_bold">Entstehungsdatum:</span></td>
        <td>26.11.2014 10:13:13</td>
      </tr>
       <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Server-Start (Betriebszeit):</span></td>
        <td width="50%" class="nowrap">27.05.2015 14:07:43 (20  d)</td>
        <td class="nowrap"><span class="verdana_11_bold">Angemeldete Benutzer (Maximum):</span></td>
        <td width="50%" class="nowrap">225 (225)</td>
      </tr>
      <tr valign="top" align="left">
        <td class="nowrap" colspan="4"><span class="verdana_14">Basismedien:</span></td>
      </tr>
      <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Start des Accountings:</span></td>
        <td>29.08.2014</td>
        <td class="nowrap"><span class="verdana_11_bold">Saldo zu Beginn:</span></td>
        <td>-1</td>
      </tr>
      <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Zeitraum [Monate]:</span></td>
        <td>1</td>
        <td class="nowrap"><span class="verdana_11_bold">Aktuelles Saldo:</span></td>
        <td>0</td>
      </tr>
      <tr valign="top" align="left">
        <td class="nowrap" colspan="4"><span class="verdana_14">Social Media:</span></td>
      </tr>
      <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Start des Accountings:</span></td>
        <td>29.08.2014</td>
        <td class="nowrap"><span class="verdana_11_bold">Saldo zu Beginn:</span></td>
        <td>-1</td>
      </tr>
      <tr valign="top">
        <td class="nowrap"><span class="verdana_11_bold">Zeitraum [Monate]:</span></td>
        <td>1</td>
        <td class="nowrap"><span class="verdana_11_bold">Aktuelles Saldo:</span></td>
        <td>0</td>
      </tr>
    </table>
  </div>

What I'd like to monitor is the following Value (Just the value in bold, nothing else): <td class="nowrap"><span class="verdana_11_bold">Angemeldete Benutzer (Maximum):</span></td> <td width="50%" class="nowrap">225 (225)</td>

Kind regards, Florian

Created on Jun 17, 2015 8:40:44 AM

Last change on Jun 17, 2015 8:43:09 AM by  Stephan Linke [Paessler Support]



Votes:

0

That's correct, you need a custom script to monitor values like this, since PRTG can only extract text from HTML pages, no numerical values.

Created on Jun 17, 2015 8:44:39 AM by  Stephan Linke [Paessler Support]

Last change on Jun 17, 2015 8:44:54 AM by  Stephan Linke [Paessler Support]



Votes:

0

Okay. Do you have an example how I could resolve it? Thank you

Created on Jun 17, 2015 9:02:10 AM



Accepted Answer

Votes:

0

Not really, but it should work using Invoke-Webrequest and the following regex:

<td[^>]*>(\d+.\(\d+\))<\/td>

It will extract "225 (225)". Should be easy with PowerShell :)

Created on Jun 17, 2015 9:54:55 AM by  Stephan Linke [Paessler Support]



Votes:

0

Okay I got it working using webrequest :) Thanks for your help.

Created on Jun 22, 2015 8:11:53 PM



Votes:

0

What sensor do you use? "Invoke-Webrequest" Which parameter of the sensor?

Created on Jul 9, 2017 2:41:19 PM



Votes:

0

I solved the problem thanks. :)

Created on Jul 9, 2017 3:29:17 PM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.