【发布时间】:2014-01-13 17:54:01
【问题描述】:
我正在尝试使用 curl 关闭正常运行时间监控,按照此处的新遗物文档中给出的说明:https://docs.newrelic.com/docs/alerts/availability-monitor-settings
根据本文档,此请求将禁用我的正常运行时间监控:
curl https://www.myhost.com/accounts/acct_id/applications/app_id/ping_targets/disable -X POST -H "X-Api-Key: "my_key"
这是我正在使用的请求(已删除个人信息): curl "https://api.newrelic.com/api/v1/accounts/NNNNNN/applications/NNNNNNN/ping_targets/disable" -X POST -H "X-Api-Key:x...x"
我已成功将我的 acct_id、app_id 和 x-api-key 用于其他 GET 命令。但是,当我尝试上述命令时,出现此错误:
<hash>
<error>The requested page could not be found</error>
</hash>
根据此堆栈交换帖子:Turn Newrelic monitoring on or off via rest api 没有办法做到这一点,但这与文档冲突。
那么,有没有办法做到这一点?有没有人成功做到这一点?
【问题讨论】: