200 |
Each agent cluster can have a compact or detailed response. It depends on the parameter compact .
- Required fields are
- surveyDate
- path
- name
- state
- maxProcesses
- numOfAgents
- _type
- The compact view doesn't have further optional fields
- The detailed view has in addition the following required field to the compact view
- The detailed view has the optional field
|
|
application/json
model |
example
{
"title": "agent clusters",
"id": "schemas/jobscheduler/agentClusters",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.jobscheduler.AgentClusters",
"type": "object",
"required": [
"deliveryDate",
"agentClusters"
],
"properties": {
"deliveryDate": {
"id": "schemas/common/deliveryDate",
"description": "Current date of the JOC server/REST service. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
"type": "string",
"format": "date-time"
},
"agentClusters": {
"type": "array",
"items": {
"id": "schemas/jobscheduler/agentCluster",
"javaType": "com.sos.joc.model.jobscheduler.AgentCluster",
"type": "object",
"oneOf": [{
"description": "if parameter compact=false or undefined",
"required": [
"surveyDate",
"path",
"name",
"state",
"numOfAgents",
"maxProcesses",
"_type",
"agents"
]
}, {
"description": "response without agents collection if parameter compact=true, configurationStatus optional",
"required": [
"surveyDate",
"path",
"name",
"state",
"numOfAgents",
"maxProcesses",
"_type"
]
}],
"properties": {
"surveyDate": {
"id": "schemas/common/surveyDate_v",
"description": "Current date of the JobScheduler Master/Agent. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
"type": "string",
"format": "date-time"
},
"path": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"name": {
"type": "string"
},
"maxProcesses": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"_type": {
"id": "schemas/jobscheduler/agentClusterType",
"javaType": "com.sos.joc.model.jobscheduler.AgentClusterType",
"type": "string",
"description": "the type of agent cluster",
"enum": [
"SINGLE_AGENT",
"FIX_PRIORITY",
"ROUND_ROBIN"
]
},
"state": {
"id": "schemas/jobscheduler/agentClusterState",
"javaType": "com.sos.joc.model.jobscheduler.AgentClusterState",
"type": "object",
"required": [
"severity",
"_text"
],
"properties": {
"severity": {
"description": "0=all Agents are running, 1=some Agents are unreachable but not all, 2=all Agents are unreachable",
"type": "integer"
},
"_text": {
"id": "schemas/jobscheduler/agentClusterStateText",
"javaType": "com.sos.joc.model.jobscheduler.AgentClusterStateText",
"type": "string",
"enum": [
"ALL_AGENTS_ARE_RUNNING",
"ONLY_SOME_AGENTS_ARE_RUNNING",
"ALL_AGENTS_ARE_UNREACHABLE"
]
}
}
},
"numOfAgents": {
"id": "schemas/jobscheduler/numOfAgents",
"type": "object",
"javaType": "com.sos.joc.model.jobscheduler.NumOfAgentsInCluster",
"required": [
"any",
"running"
],
"properties": {
"any": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"running": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
}
}
},
"agents": {
"type": "array",
"items": {
"id": "schemas/jobscheduler/agentOfCluster_p",
"javaType": "com.sos.joc.model.jobscheduler.AgentOfCluster",
"type": "object",
"required": [
"surveyDate",
"version",
"host",
"url",
"os",
"state",
"startedAt"
],
"properties": {
"surveyDate": {
"id": "schemas/common/surveyDate_p",
"description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
"type": "string",
"format": "date-time"
},
"version": {
"type": "string"
},
"host": {
"type": "string"
},
"url": {
"description": "url can be different against host/port if agent behind a proxy",
"type": "string",
"pattern": "https?://.+"
},
"os": {
"id": "schemas/jobscheduler/os",
"javaType": "com.sos.joc.model.jobscheduler.OperatingSystem",
"type": "object",
"required": [
"name",
"architecture",
"distribution"
],
"properties": {
"name": {
"description": "Windows, Linux, AIX, Solaris, other",
"type": "string"
},
"architecture": {
"type": "string"
},
"distribution": {
"description": "e.g. Windows 2012, CentOS Linux release 7.2.1511 (Core)",
"type": "string"
}
}
},
"state": {
"id": "schemas/jobscheduler/state",
"javaType": "com.sos.joc.model.jobscheduler.JobSchedulerState",
"type": "object",
"required": [
"severity",
"_text"
],
"properties": {
"severity": {
"description": "0=running/starting, 1=paused, 3=waiting_for_activation/terminating, 2=waiting_for_database/dead/unreachable",
"type": "integer"
},
"_text": {
"id": "schemas/jobscheduler/stateText",
"javaType": "com.sos.joc.model.jobscheduler.JobSchedulerStateText",
"type": "string",
"enum": [
"STARTING",
"RUNNING",
"PAUSED",
"WAITING_FOR_ACTIVATION",
"TERMINATING",
"WAITING_FOR_DATABASE",
"DEAD",
"UNREACHABLE",
"UNKNOWN_AGENT"
]
}
}
},
"startedAt": {
"id": "schemas/common/timestamp",
"description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
"type": "string",
"format": "date-time"
},
"runningTasks": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
}
}
}
},
"numOfProcesses": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"processes": {
"type": "array",
"items": {
"id": "schemas/processClass/process",
"javaType": "com.sos.joc.model.processClass.Process",
"type": "object",
"required": [
"job",
"taskId",
"pid",
"runningSince"
],
"properties": {
"job": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"taskId": {
"type": "string"
},
"pid": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"runningSince": {
"id": "schemas/common/timestamp",
"description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
"type": "string",
"format": "date-time"
},
"agent": {
"description": "url",
"type": "string",
"pattern": "https?://.+"
}
}
}
},
"configurationStatus": {
"id": "schemas/common/configurationStatus",
"javaType": "com.sos.joc.model.common.ConfigurationState",
"type": "object",
"required": [
"severity",
"_text"
],
"properties": {
"severity": {
"description": "4=ok; 5=replacement_is_standing_by,removing_delayed; 2=error_in_configuration_file,changed_file_not_loaded,resource_is_missing",
"type": "integer"
},
"_text": {
"id": "schemas/common/configurationStatusText",
"javaType": "com.sos.joc.model.common.ConfigurationStateText",
"type": "string",
"enum": [
"ERROR_IN_CONFIGURATION_FILE",
"CHANGED_FILE_NOT_LOADED",
"REMOVING_DELAYED",
"RESOURCE_IS_MISSING",
"REPLACEMENT_IS_STANDING_BY",
"OK"
]
},
"message": {
"description": "contains e.g. error message",
"type": "string"
}
}
}
}
}
}
}
}
{ "deliveryDate": "2016-05-05T20:34:51Z", "agentClusters": [{ "surveyDate": "2016-05-05T20:34:51Z", "path": "/agents/galadriel", "state": { "severity": 1, "_text": "only_some_agents_are_running" }, "numOfAgents": { "any": 2, "running": 1 }, "agents": [{ "surveyDate": "2016-05-05T20:34:51Z", "version": "1.11.0", "host": "galadriel", "port": 4445, "url": "http://galadriel:4445", "os": { "name": "linux", "architecture": 64, "distribution": "CentOS Linux release 7.2.1511" }, "state": { "severity": 0, "_text": "running" }, "startedAt": "2016-04-20T23:55:00Z", "runningTasks": 2 }, { "surveyDate": "2016-05-05T20:34:51Z", "url": "http://galadriel:4447", "state": { "severity": 2, "_text": "unreachable" } }] }, { "surveyDate": "2016-05-05T20:34:51Z", "path": "/agents/galadriel-4445", "state": { "severity": 0, "_text": "all_agents_are_running" }, "numOfAgents": { "any": 1, "running": 1 }, "agents": [{ "surveyDate": "2016-05-05T20:34:51Z", "version": "1.11.0", "host": "galadriel", "port": 4445, "url": "http://galadriel:4445", "os": { "name": "linux", "architecture": 64, "distribution": "CentOS Linux release 7.2.1511" }, "state": { "severity": 0, "_text": "running" }, "startedAt": "2016-04-20T23:55:00Z", "runningTasks": 0 }] }, { "surveyDate": "2016-05-05T20:34:51Z", "path": "/agents/frodo-4445", "state": { "severity": 2, "_text": "all_agents_are_unreachable" }, "numOfAgents": { "any": 1, "running": 0 }, "agents": [{ "url": "http://frodo.proxy", "state": { "severity": 2, "_text": "unreachable" } }] }] }
{
"deliveryDate": "2016-05-05T20:34:51Z",
"agentClusters": [{
"surveyDate": "2016-05-05T20:34:51Z",
"path": "/agents/galadriel",
"state": {
"severity": 1,
"_text": "only_some_agents_are_running"
},
"numOfAgents": {
"any": 2,
"running": 1
},
"agents": [{
"surveyDate": "2016-05-05T20:34:51Z",
"version": "1.11.0",
"host": "galadriel",
"port": 4445,
"url": "http://galadriel:4445",
"os": {
"name": "linux",
"architecture": 64,
"distribution": "CentOS Linux release 7.2.1511"
},
"state": {
"severity": 0,
"_text": "running"
},
"startedAt": "2016-04-20T23:55:00Z",
"runningTasks": 2
}, {
"surveyDate": "2016-05-05T20:34:51Z",
"url": "http://galadriel:4447",
"state": {
"severity": 2,
"_text": "unreachable"
}
}]
}, {
"surveyDate": "2016-05-05T20:34:51Z",
"path": "/agents/galadriel-4445",
"state": {
"severity": 0,
"_text": "all_agents_are_running"
},
"numOfAgents": {
"any": 1,
"running": 1
},
"agents": [{
"surveyDate": "2016-05-05T20:34:51Z",
"version": "1.11.0",
"host": "galadriel",
"port": 4445,
"url": "http://galadriel:4445",
"os": {
"name": "linux",
"architecture": 64,
"distribution": "CentOS Linux release 7.2.1511"
},
"state": {
"severity": 0,
"_text": "running"
},
"startedAt": "2016-04-20T23:55:00Z",
"runningTasks": 0
}]
}, {
"surveyDate": "2016-05-05T20:34:51Z",
"path": "/agents/frodo-4445",
"state": {
"severity": 2,
"_text": "all_agents_are_unreachable"
},
"numOfAgents": {
"any": 1,
"running": 0
},
"agents": [{
"url": "http://frodo.proxy",
"state": {
"severity": 2,
"_text": "unreachable"
}
}]
}]
}
|