This article applies as of PRTG 22



Is it possible to create a custom SNMP/sensor/app for a web application that can be queried by PRTG? For example, To monitor web app stats (number of purchases, active shopping carts, product searches, pages served) along with hardware metrics.


Using the HTTP Content sensor

The HTTP Content sensor is an easy way to monitor the internal values of a web server based application.

The sensor requests a URL from your server and looks for a numeric value that must be surrounded by brackets inside the HTML. The sensor uses this value as the sensor result (for example in graphs) and you can create triggers and notifications based on this value.


How to do it

Create a script on the web server that reads the desired value from the server and renders a small HTML page with the value between [] brackets. Then set up an HTTP Content sensor and enter the URL of the script.


Things you can monitor

  • Number of sold items
  • Number of customers
  • Number of new users
  • Daily/monthly/total sales
  • Database size
  • Records in a database table
  • Free disk space
  • CPU load
  • Any other value that can be accessed from your web application


Note: You can even monitor several values (each surrounded by brackets) with one HTTP Content sensor.


More


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.