Cloud Monitoring – Creating checks with curl.

Creating Monitoring checks for your Monitoring Entity isn’t the easiest task it seems.


When I do so It errors out on me.


curl -i
‘{ “details” : {  },
  “label” : “Website check 1”,
  “monitoring_zones_poll” : [ “mzdfw” ],
  “period” : “60”,
  “target_alias” : “default”,
  “timeout” : 30,
  “type” : “”
-H “X-Auth-Token: $mytoken”
-H “Content-Type: application/json”
-H “Accept: application/json”


HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Tue, 08 May 2012 01:51:58 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://localhost

<head><title>301 Moved Permanently</title></head>
<body bgcolor=”white”>
<center><h1>301 Moved Permanently</h1></center>

HTTP/1.1 400 Bad Request
Date: Tue, 08 May 2012 01:51:59 GMT
Content-Type: application/json; charset=UTF-8
X-Response-Id: .rh-TgPz.h-ord1-maas-prod-api0.r-1tz1DtHp.c-5397.ts-1336441919149.v-89b0c33036e796de2268605c1b603cbb61ce7b1c
X-LB: ord1-maas-prod-api0
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked

    “type”: “badRequest”,
    “code”: 400,
    “message”: “Validation error: “,
    “details”: “Invalid application/json”,
    “txnId”: “.rh-TgPz.h-ord1-maas-prod-api0.r-1tz1DtHp.c-5397.ts-1336441919149.v-89b0c33036e796de2268605c1b603cbb61ce7b1c”

I finally got this Garsh Dang Rotten Contraption to work (Note to self put all required variables in):

HTTP/1.1 200 OK
Date: Tue, 08 May 2012 14:04:53 GMT
Content-Type: application/json; charset=UTF-8
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 500
X-RateLimit-Window: 24 hours
X-RateLimit-Type: test_check
X-Response-Id: .rh-XDnl.h-ord1-maas-prod-api1.r-qzhJcgSX.c-18683.ts-1336485893725.v-997d12b2acb262c2f97243d46adad674da692289
X-LB: ord1-maas-prod-api1
Vary: Accept-Encoding
Transfer-Encoding: chunked

        “timestamp”: 1336485901882,
        “monitoring_zone_id”: “mzdfw”,
        “available”: true,
        “status”: “cnt=5,avail=100,min=0.0254,max=0.0255,avg=0.0254”,
        “metrics”: {
            “maximum”: {
                “type”: “n”,
                “data”: “2.549000084400e-02”
            “minimum”: {
                “type”: “n”,
                “data”: “2.537599951029e-02”
            “count”: {
                “type”: “i”,
                “data”: “5”
            “average”: {
                “type”: “n”,
                “data”: “2.540679983795e-02”
            “available”: {
                “type”: “n”,
                “data”: “1.000000000000e+02”

jim has written 83 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>