Open solarchad opened 4 years ago
Also, it seems like I can create an alert with a zero threshold using curl:
curl \
-u $APPOPTICS_TOKEN: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"name":"production.web.frontend.response_time",
"description":"Web Response Time",
"conditions":[
{
"type":"above",
"metric_name":"system.cpu.utilization",
"threshold":0,
"summary_function":"max",
"tags":[
{
"name":"tag_name",
"grouped":false,
"values":[
"tag_value"
]
}
]
}
],
"attributes": {
"runbook_url": "http://myco.com/runbooks/response_time"
},
"active":true,
"md":true
}' \
"https://api.appoptics.com/v1/alerts"
When trying to create an alert with a condition that has a threshold value of "0" (zero), I'm seeing this response:
Here is the sample code I was testing with:
I would expect for this alert to create successfully. Also, if there is an error, I would expect that error to be returned with the message:
But there's nothing after the colon. I see the error in the
response body
because I have the debug mode on.