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

Create amazon cloudwatch sensors from API

Votes:

0

Hi guys, i try to create amazon cloudwatch sensor by api request, but without success. I run this request https://myhostname.com/api/duplicateobject.htm?id=1&targetid=2&name=AWS_SENSOR&instance=i-XXXXXX and always get duplicated sensor with unchanged aws instance_id. I read documentation and these describe thats i can`t change instance_id on created aws cloudwatch sensor. How i can create aws cloudwatch sensor by api request with custom instance ID ?

api aws cloudwatch

Created on Sep 30, 2015 6:24:40 AM



3 Replies

Votes:

0

Dear Roman

The new Amazon Cloudwatch sensors are device template capable.

In principle, you can use the API to change some sensor properties via

/api/setobjectproperty.htm

The full syntax is

/api/setobjectproperty.htm?id=<objid>&name=<property label>&value=<new value>

We don't provide a list of all possible &name= labels. However you can derive those from the HTML source of the input fields of the sensor option form. If the HTML shows a trailing underscore, please remove it when you use it in the API call as &name= property.

This only works for simple value types like numbers and strings. It is not advisable to attempt to change read-only values. If you want to experiment regardless, please backup your configuration by creating a copy of the PRTG Configuration.dat file.

Created on Oct 1, 2015 1:01:57 PM by  Arne Seifert [Paessler Support]

Last change on Oct 1, 2015 1:04:43 PM by  Arne Seifert [Paessler Support]



Votes:

0

Thanks guys, i successfully created my script. But i think prtg api is terrible. I need do lot of unnecessary steps for AWS cloudwatch sensor creation:

  • duplicate sensor
  • get new sensor id from redirect url
  • change sensor value by id
  • start sensor by id

Why i cant duplicate sensor, change it value and start it, by one api command ?

Created on Oct 5, 2015 2:47:06 AM



Votes:

0

Dear Roman

The API was never intended to offer such complex operations. We focus mostly on the main input mode – the GUI.

Created on Oct 5, 2015 11:03:02 AM by  Arne Seifert [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.