New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

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

 

Top Tags


View all Tags


Create amazon cloudwatch sensors from API

Votes:

0

Your Vote:

Up

Down

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 by  RomanCherednikov (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  RomanCherednikov (0) 1



Votes:

0

Your Vote:

Up

Down

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]



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.