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

How can I monitor a string in the HTML of a webpage?

Votes:

0

I want to monitor a value in the HTML of a web page.

Depending on the returned values the sensor should show different states and different sensor messages.

The values on the web page I want to monitor are in a similar format that you would use for the HTTP Content sensor:

[integer][string]

The HTTP Content sensor can only monitor integers, not strings.

How can I achieve my goal?

custom-exe custom-script-exe exe-script-sensor html http http-content-sensor powershell prtg script string

Created on Feb 25, 2013 1:49:59 PM by  Gerald Schoch [Paessler Support]

Last change on Mar 19, 2015 3:39:12 PM by  Martina Wittmann [Paessler Support]



3 Replies

Accepted Answer

Votes:

0

This article applies to PRTG Network Monitor 12 or later

Monitoring Strings in the HTML of Web Pages

In order to process the HTML of web pages to receive sensor states corresponding to the returned values in the format [value][string], you can use a custom sensor with a script file. Create a powershell script for this issue and add it to an EXE/Script Advanced Sensor in PRTG.

For more details and a basic script, please refer to the following article: Monitor 1 value, on error send 2nd value.

Created on Feb 25, 2013 1:53:31 PM by  Gerald Schoch [Paessler Support]

Last change on Feb 26, 2013 9:47:05 AM by  Daniel Zobel [Product Manager]



Votes:

0

Is this still the best way to achieve this? Can we not add the string you are looking for using advanced http sensor or other http sensors? Seems a bit old school to have to write a script to achieve it when you have so many http sensor templates

Created on Mar 15, 2022 6:08:06 AM



Votes:

0

Hello Anthony,

This post is indeed quite old (2013), you indeed have the possibility to search for a specific string by using the HTTP Advanced sensor whose manual is available there: https://www.paessler.com/manuals/prtg/http_advanced_sensor.

The latter gets the source code and look for the string there. Afterwards, depending on your configuration and the result, the sensor will go in warning/error state and trigger an alert accordingly.

Please, note that you might not be able to monitor a specific string from a website whose content is added dynamically via JavaScript for example.

Regards.

Created on Mar 15, 2022 7:22:52 AM by  Florian Lesage [Paessler Support]




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.