我正在通过 api 创建一个 pingdom 检查,但是似乎 http 属性没有被接受,不确定我是否在语法中遗漏了一些东西。这是我使用的卷曲,
curl -X POST -u 'your@email:yourpassword' -H "app-key: app-key" -d 'name=new&type=http&port=443&host=www.mydomain.com' https://api.pingdom.com/api/2.0/checks
正在创建检查,但是 HTTPPort 仍然是默认的。有人可以提出任何解决方案来解决。
当通过 GUI 创建时,它允许为 HTTP 添加一个端口,遵循 ig 对通过 GUI 创建的检查之一的获取请求,
{"check":{"id":1915300,"name":"test123","resolution":1,"sendtoemail":true,"sendtosms":false,"sendtotwitter":false,"sendtoiphone":false,"sendtoandroid":false,"sendnotificationwhendown":4,"notifyagainevery":60,"notifywhenbackup":true,"created":1450100471,"use_legacy_notifications":true,"type":{"http":{"url":"\/","encryption":true,"port":443,"requestheaders":{"User-Agent":"Pingdom.com_bot_version_1.4_(http:\/\/www.pingdom.com\/)"}}},"hostname":"mydomain.com","contactids":[10383440,10233710],"ipv6":false,"status":"up","lasterrortime":1453959166,"lasttesttime":1456295446,"lastresponsetime":151,"alert_policy":1077635,"alert_policy_name":"Alert immediately","acktimeout":0,"autoresolve":0,"tags":[],"probe_filters":[]}}
这里将端口 443 分配给 HTTP 类型。