Each monitored IP address needs its own file of alert thresholds. Configure the Internet Alerts – Performance thresholds for an IP address by first getting the current collectors file using Get Current Internet Alerts – Performance Collectors (API). Edit the information received to add the new collectors or remove current ones, then update your performance monitor alert thresholds using the cURL example on this page.

NOTE: When you use this command, you are replacing the collector threshold information for this IP address. Make sure to include ALL performance alert thresholds, the new alert thresholds and the ones staying the same. Remove thresholds you no longer want for this IP address.

Syntax

Click to view all Internet Alerts – Performance API Resources
PUT /portfolio/performance/assets — Assigns alert thresholds for one or more collectors to the IP address identified.

cURL example for updating thresholds(s) for an IP address in a monitored inventory:

$ curl -u username:password -X PUT -d @configure-ip.json https://api.renesys.com/portfolio/performance/assets/{IP}

where {IP} is replaced with the IP address and configure-ip.json contains the following:

[
  {
    "collector": "rack-london",
    "latency_fixed": 50,
    "packetloss_percent": 30
  },
  {
    "collector":"aws-san-francisco-us-west-1c", 
    "latency_fixed": 30,
    "packetloss_percent": 10
  }
]

This example shows the currently assigned collectors for the IP address, retrieved using the Get Current Internet Alerts – Performance Collectors (API) command. If you are setting collector thresholds for the first time on this IP address, the response fields will be null.

To set thresholds for another collector or to remove one of the collectors listed, edit the settings to include the information for the additional collector or remove the settings for the collector no longer needed and use this cURL command to replace the current configure-ip.json. You are replacing the settings that already exist. No threshold collectors will change until you use this command to replace it.

Arguments:

collector – The name of the collector, usually identified by type of collector and location. Types of collectors can include AWS (Amazon Web Services), RACK (Rackspace), DO (Digital Ocean), SOFT (Softlayer), GCE (Google Compute Engine), etc.

latency_fixed – The latency threshold in milliseconds. An alert is raised if the collector measures latency (PING time) that exceeds this number of milliseconds.

packetloss_percent – The packet loss rate as a percent of packets. An alert is raised if the collector measures packet loss that exceeds this percentage of packet loss.

When both measures are set, an alert is raised if the rack-london collector measures latency (PING time) that exceeds 50 ms OR the packet loss rate exceeds 30%.

Response:

HTTP/1.1 201 Created
Date: Fri, 22 Jul 2016 19:10:56 GMT
Server: TornadoServer/4.2
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding
Connection: close