我正在通过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添加一个端口,然后按照get请求通过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类型。
发布于 2016-02-24 09:43:36
我可以看到您正在尝试使用port=443,这443端口用于ssl (https)。你不能用它做http。尝试与其他端口,它应该适用于您。
TCP端口443是用于使用SSL的网站的标准TCP端口。当您在开始时访问使用https的网站时,您将连接到端口443。
https://stackoverflow.com/questions/35597763
复制相似问题