api to add condition for newrelic

Solutions on MaxInterview for api to add condition for newrelic by the best coders in the world

showing results for - "api to add condition for newrelic"
Sophia
18 Sep 2018
1curl -X POST 'https://infra-api.newrelic.com/v2/alerts/conditions' -H 'Api-Key:NEW_RELIC_USER_KEY' -i -H 'Content-Type: application/json' -d
2'{
3   "data":{
4      "type":"infra_metric",
5      "name":"Disk Space Condition",
6      "enabled":true,
7      "where_clause":"(hostname LIKE '\''%cassandra%'\'')",
8      "policy_id":policy_id,
9      "event_type":"StorageSample",
10      "select_value":"diskFreePercent",
11      "comparison":"below",
12      "critical_threshold":{
13         "value":10,
14         "duration_minutes":1,
15         "time_function":"any"
16      },
17      "warning_threshold":{
18         "value":30,
19         "duration_minutes":2,
20         "time_function":"any"
21      }
22   }
23}'
24