Answers for "Api to add condition for newrelic"

PHP
0

Api to add condition for newrelic

curl -X POST 'https://infra-api.newrelic.com/v2/alerts/conditions' -H 'Api-Key:NEW_RELIC_USER_KEY' -i -H 'Content-Type: application/json' -d
'{
   "data":{
      "type":"infra_metric",
      "name":"Disk Space Condition",
      "enabled":true,
      "where_clause":"(hostname LIKE '\''%cassandra%'\'')",
      "policy_id":policy_id,
      "event_type":"StorageSample",
      "select_value":"diskFreePercent",
      "comparison":"below",
      "critical_threshold":{
         "value":10,
         "duration_minutes":1,
         "time_function":"any"
      },
      "warning_threshold":{
         "value":30,
         "duration_minutes":2,
         "time_function":"any"
      }
   }
}'
Posted by: Guest on December-09-2020

Browse Popular Code Answers by Language