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 result of a command via curl



Dear, good afternoon I need a help a customer sent the following demand, monitor this command

curl -s http://www.nfe.fazenda.gov.br/portal/availability.aspx | grep "<td> RS </td>" | sed -n 2p | grep -c red_ball

 0 = service OK

1 = service OFF

How can I do this?

curl http-api prtg-api web-api website

Created on Aug 28, 2019 7:21:49 PM

1 Reply



Hello Daniel,

You can use the SSH Script Sensor to execute the script of your choice. You need to copy the script to the target host in the directory /var/prtg/scripts. You can find the required syntax on the Setup > PRTG API > Custom Sensors page.

The result needs to look like that: returncode:value:message, where the return code looks as follows:

0	OK
2	System Error (e.g. a network/socket error)
3	Protocol Error (e.g. web server returns a 404)
4	Content Error (e.g. a web page does not contain a required word)

Kind regards,
Felix Saure, Tech Support Team

Created on Aug 29, 2019 6:00:17 AM by  Felix Saure [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.