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?


Article Comments

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


Aug, 2019 - Permalink