New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Monitor result of a command via curl

Votes:

0

Your Vote:

Up

Down

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 by  Daniel (0) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

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
1	WARNING
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]



Please log in or register to enter your reply.


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.