I'm trying to add new amazon cloudwatch sensors using the prtg api from the command line. For example when a new EC2 instance is generated in Amazon, I want to add the new instance to PRTG. I have the access keys and can sample the Amazon API for the instance ID, but I'm not sure how to add it into PRTG automatically. Any ideas?
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Hello,
you can do this with the PRTG API, see "Setup"->"PRTG API"->"Object Manipulation":
- Duplicate the existing sensor:
/api/duplicateobject.htm?id=id_of_sensor_to_clone&name=new_name&targetid=id_of_target_device
- Then use the setobjectproperty API-Call to change the Accesskey & Instance ID:
/api/setobjectproperty.htm?id=10214&name=PROPERTY&value=
The properties for the Amazon Cloudwatch sensor are:
- Accesskeyid
- Secretaccesskeyid
- Location
- Service (static, cannot be changed on existing/cloned sensors)
- instance
So it is important to only clone sensors for the same types of Amazon instances
best regards.
Sep, 2012 - Permalink
Hello,
you can do this with the PRTG API, see "Setup"->"PRTG API"->"Object Manipulation":
The properties for the Amazon Cloudwatch sensor are:
So it is important to only clone sensors for the same types of Amazon instances best regards.
Sep, 2012 - Permalink