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

Factory sensors & PRTG API

Votes:

0

Hi,

I'm using PRTG API to automatically add factory sensors into the system. To do so, I use a copy of a "template" factory sensor. The copy works great.

Now I'd like to modify channel definition of the factory sensor with the API. I checked the source code of the web page, and noticed this field was not an <input> field but a <textarea> field.

So I'd like to know if there is a way to modify this field with the API ?

Thanks, Jerome

api prtg sensor-factory

Created on Sep 9, 2010 1:37:58 PM



5 Replies

Accepted Answer

Votes:

0

Dear Jerome,

it should work, if you do HTTP-encode the line breaks and put these into the API-call as well.

Best regards.

Created on Sep 20, 2010 7:24:41 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Thanks Torsten for your answer.

It now works perfectly. I'm working with .Net and coding in C#. Just for everybody's information, the method HttpUtility.UrlEncode (System.Web) must be applied on each argument of the URL used with the PRTG API.

Created on Sep 24, 2010 9:40:39 AM



Votes:

0

Hi,

I need a way to create Factory Sensor automatically. These Factory Sensors will be an aggregation of traffic sensors of a specific group.

Is there a way to verify all traffic sensor on a group, verify which of then are up and then create a Factory Sensor automatically with these informations?

Is it possible using PRTG API?

Thank you!

Created on Jan 10, 2011 12:55:25 PM

Last change on Jan 11, 2011 4:51:48 PM by  Daniel Zobel [Product Manager]



Votes:

0

I am trying to edit factory sensors using the API. I have edited many different things like names and tags etc. but I can not seem to change the actual channels of the factory sensor.

I can see that the field that the sensor data is in is called aggregationchannel_, but I can not get the information out of it using the API. I have tried without the underscore as it says to but it always comes up not found.

Any hints how to access that field to read or write?

Thanks

Created on Dec 4, 2012 12:07:12 AM



Votes:

0

Hi,
you should at least to be able to read from the field with the following call (we tested this successfully on 4 installations):

/api/getobjectproperty.htm?id=xyz&name=aggregationchannel

(where "xyz" is the sensor ID) When writing to the aggregationchannel field, please note that every special character has to be URL-Encoded.
Best regards

Created on Dec 4, 2012 12:50:28 PM by  Konstantin Wolff [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.