Events HTTP API
The /event/stream
endpoint is used to stream events generated by Nomad.
Event Stream
This endpoint streams a servers backlog of events as well as new events as they occur. The stream will be kept alive until the connection is closed.
Method | Path | Produces |
---|---|---|
GET | /v1/event/stream | application/json |
The table below shows this endpoint's required ACLs. Due to the nature of this endpoint individual topics require specific policies.
Note that if you do not include a topic
parameter all topics will be included
by default, requiring a management token.
Topic | ACL Required |
---|---|
* | management |
ACLToken | management |
ACLPolicy | management |
Job | namespace:read-job |
Allocation | namespace:read-job |
Deployment | namespace:read-job |
Evaluation | namespace:read-job |
Node | node:read |
Parameters
index
(int: 0)
- Specifies the index to start streaming events from. If the requested index is no longer in the buffer the stream will start at the next available index.namespace
(string: "default")
- Specifies the target namespace to filter on. Specifying*
includes all namespaces for event types that support namespaces. If you specify all namespaces (*
) you'll either need a management token, or an ACL Policy that explicitly applies to all namespaces (*
).topic
(topic:filter_key: "*:*")
- Specifies a topic to subscribe to and filter on. The default is to subscribe to all topics. Multiple topics may be specified by passing multipletopic
parameters. A valid topic parameter includes atopic
type and an optionalfilter_key
separated by a colon:
. As an example?topic=Deployment:redis
would subscribe to allDeployment
events for a job redis. an additional topic&topic=Deployment:web
would include deployment events for redis and web. To only subscribe toNode
events a topic parameter of?topic=Node
without a separator value would be used.?topic=Node:*
is also valid.
Event Topics
Topic | Output |
---|---|
ACLToken | ACLToken |
ACLPolicy | ACLPolicy |
Allocation | Allocation (no job information) |
Job | Job |
Evaluation | Evaluation |
Deployment | Deployment |
Node | Node |
NodeDrain | Node |
Event Types
Type |
---|
ACLTokenUpserted |
ACLTokenDeleted |
ACLPolicyUpserted |
ACLPolicyDeleted |
AllocationCreated |
AllocationUpdated |
AllocationUpdateDesiredStatus |
DeploymentStatusUpdate |
DeploymentPromotion |
DeploymentAllocHealth |
EvaluationUpdated |
JobRegistered |
JobDeregistered |
JobBatchDeregistered |
NodeRegistration |
NodeDeregistration |
NodeEligibility |
NodeDrain |
NodeEvent |
PlanResult |
Sample Request
Sample Response