Common message format
Create a common message format (likely in json) with mandatory, optional fields that can be used by audit and repair engines, workers, producers, consumers... This will allow various existing systems (or new systems) to know how to produce information for consumption inside entropy (and so that those systems can interact with entropy).
More details needed :)
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
To start off with I am proposing the following, we will probably need to go through many iteration of this to refine the final message format, but just writing this down to get the discussion going:
For Audit request:
{
[Optional] "audit_id": str - unique id for the audit message,
[Optional] "created_at": str - datetime,
[Optional] "updated_at": str - datetime,
[Optional] "disabled": bool - True or False,
[Mandatory] "hostname": str - Hostname of the machine this audit is for,
[Mandatory] "host_type": str - Type of this host (compute, hypervisor, others),
[Mandatory] "ip_address": str - IP,
[Mandatory] "next_run": str - Datetime this audit should run next,
[Optional] "region": str - Region where this host is,
[Optional] "cell": str - If cells servcie is used the name of the cell,
[Optional] "parent": str - Parent of this host[ for example a compute will have hypervisor as parent],
[Optional] "child": str - Child of this host [for example a hypervisor will have compue as its child],
[Mandatory] "status": str - Status of this record
[Optional] "msg_type": str - Message type,
[Optional] "service_type": str - If the audit is for a specific service like nova-compute,
[Optional] "metadata": str - Allow optional key/value metadata that can be used for specific needs,
}
For Alerts/Repair request:
(Using the term alert here, but this is the request for repair)
{
[Mandatory] "alert_id": str - Id for the alert/reparir request (generated by auditor or something else),
[Mandatory] "alert_type": str - What type of repair this (should be one of HOST or SERVICE),
[Optional] "alerting_service": str - Serivce that producted this message (Entropy-Auditor etc),
[Optional] "alerting_host": str - Auditor(fqdn, ip, hostname ) or other host that producted this message,
[Optional] "created_at": str - datetime,
[Optional] "updated_at": str - datetime,
[Mandatory] "hostname": str - hostname of the server this message is for,
[Mandatory] "ip_address": str - ip address of the server this message is for,
[Mandatory] "state": str - state of this service or host (WARNING, CRITICAL, UNKNOWN)
[Mandatory] "status": str - status of this message (new, update)
[Mandatory] "type": str - (alert| repair-request)
[Optional] "region": str - Region where this host is,
[Optional] "cell": str - Cell if enabled,
[Optional] "parent": str - Parent of this host,
[Optional] "child" str - Child of this host,
[Optional] "metadata": str - Allow optional key/value metadata,
}
-Sulochan Acharya (19th April 2014)