Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

checks data structure incomplete #12

Closed
aussielunix opened this issue Dec 9, 2014 · 2 comments
Closed

checks data structure incomplete #12

aussielunix opened this issue Dec 9, 2014 · 2 comments

Comments

@aussielunix
Copy link

If I look at api#checks then it says that a check will have the following data structure;

Field Type
name String
id String
tags Array[String]

If I run the following against the vagrant-flapjack (Flapjack version 1.2.1rc2 ) then I get something different in return.

foo@bar # http http://localhost:3081/checks 
HTTP/1.1 200 OK
Access-Control-Allow-Headers: *, Content-Type, Accept, AUTHORIZATION, Cache-Control
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma
Access-Control-Max-Age: 1728000
Connection: keep-alive
Content-Length: 1302
Content-Type: application/vnd.api+json; charset=utf-8
Server: thin
{
    "checks": [
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:HOST", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "HOST", 
            "tags": [
                "localhost", 
                "host"
            ]
        }, 
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:Current Load", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "Current Load", 
            "tags": [
                "localhost", 
                "current", 
                "load"
            ]
        }, 
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:Current Users", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "Current Users", 
            "tags": [
                "localhost", 
                "current", 
                "users"
            ]
        }, 
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:Disk Space", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "Disk Space", 
            "tags": [
                "localhost", 
                "disk", 
                "space"
            ]
        }, 
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:HTTP", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "HTTP", 
            "tags": [
                "localhost", 
                "http"
            ]
        }, 
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:SSH", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "SSH", 
            "tags": [
                "localhost", 
                "ssh"
            ]
        }, 
        {
            "enabled": true, 
            "entity_name": "localhost", 
            "id": "localhost:Total Processes", 
            "links": {
                "entities": [
                    "1052bfb2-d65d-4b0e-8811-2228bb635722"
                ]
            }, 
            "name": "Total Processes", 
            "tags": [
                "localhost", 
                "total", 
                "processes"
            ]
        }
    ]
}
@aussielunix
Copy link
Author

updated data structure should be:

Field Type
name String
id String
tags Array[String]
enabled Boolean
entity_name String
links Hash[Array] ?

@ghost
Copy link

ghost commented Dec 10, 2014

Yup, these docs are out of date. :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant