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

Example for HTTP Push Data in C#

Votes:

0

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



1 Reply

Votes:

1

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]




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.