-
Notifications
You must be signed in to change notification settings - Fork 2
openITCOCKPIT API
jabdr edited this page Feb 24, 2021
·
3 revisions
This documentation descrips the openITCOCKPIT API used by the Agent in Push mode.
Used to register new Agent and to check authorization state.
Request: POST /agentconnector/register_agent.json
{
"agentuuid": "<uuid>",
"password": "", // Empty for new Agents
"hostname": "<optional>",
"ipaddress": "<optional>"
}
Response:
Status: 201 Created
{
"uuid": "<uuid>",
"password": "32e8d6eefa9c50e07e9296cd0202126a5926dc4dd473400d3..."
}
Request: POST /agentconnector/register_agent.json
Status: 200 OK
{
"agentuuid": "<uuid>",
"password": "32e8d6eefa9c50e07e9296cd0202126a5926dc4dd473400d3..."
}
400 Bad Request
{
"error": "Field uuid or password is missing in POST data"
}
403 Forbidden
{
"error": "The given UUID is already registed with a password!"
}
404 Not Found
{
"error": "No Agent found for given UUID and password"
}
405 Method Not Allowed
{
"message": "Method Not Allowed",
"url": "\/agentconnector\/register_agent.json",
"code": 405
}
Used to push check result data to openITCOCKPIT Monitoring Server
Request: POST /agentconnector/submit_checkdata.json
{
"agentuuid": "<uuid>",
"password": "32e8d6eefa9c50e07e9296cd0202126a5926dc4dd473400d3...",
"checkdata": {
"agent": {},
"cpu": {},
"customchecks": {},
"disk_io": {},
"disks": {},
...
}
}
Response:
Status: 200 OK
{
"received_checks": 10
}
400 Bad Request
{
"error": "Invalid credentials or host not found"
}
405 Method Not Allowed
{
"message": "Method Not Allowed",
"url": "\/agentconnector\/submit_checkdata.json",
"code": 405
}