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

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 Download

Top Tags


View all Tags

Example for HTTP Push Data in C#

Votes:

0

Your Vote:

Up

Down

may I have a example for Get HTTP GET request in C#?

Unfortunately I found only Powershell and Python in Google https://blog.paessler.com/how-to-monitor-server-room-temperature-with-prtg-on-a-budget https://www.msxfaq.de/tools/prtg/prtghttppushsensoren.htm

Thanks

http-get http-push-data httppush

Created on Oct 22, 2020 7:30:48 AM by  wakaa (0) 1



1 Reply

Votes:

1

Your Vote:

Up

Down

Hello,

Thank you for your message.

To check how to execute a request in a specific language, I invite you to use the tool called Postman. You can find it right here: https://www.postman.com/

With Postman, when you have configured your HTTP request, you can export it in the programming language you desire, including C#:

var client = new RestClient("https://{PRTGServer}:{Port}/{Token}?value={Value}&text={Message}");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Please replace tha variables between {} according to the configuration of your PRTG Server as well as HTTP Push Data sensor.

Kind regards.

Created on Oct 22, 2020 3:20:23 PM by  Florian Lesage [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.