Status (and state)
Resources have specific statuses, and in turn each status has a state of open, clear or closed.
Status
A single status can affect multiple resources, and a single resource can have multiple different statuses. For example, a single link down event can generate the status for both the interface resource and the host resource; or a single host could have CPU or disk usage status in addition to any link down status.
Resource status can be viewed in the Topology Viewer, and can be set or retrieved via the topology service REST API. An 'open' event is one with a severity other than 'clear'.
You can access the Swagger documentation for 'status' at the following default link: https://localhost/1.0/topology/swagger/#/Status
Important: When modeling resources, you must consider Status assignment from
events.
Tip: The Topology Service stores the event Severity, and nodes in the UI are
colored based on severity, which is always one of the following:
- clear
- indeterminate
- information
- warning
- minor
- major
- critical
Status assignment
The status of a single resource can be supplied, alongside other resource properties, when
creating or updating a resource. Alternatively, an event can generate the status of one or more
resources.
Remember: A status always has one of the following three states:
- Open
- Always has a severity other than 'clear'
- Clear
- Working as expected
- Closed
- No longer active or relevant, a deleted event
Status assignment from events
The status service receives events and tries to find matching resources in the topology service.
A resource with no match tokens defined will not have events matched to it, but if found, the status
of those resources is set from the event data. The assigned status depends on the following event data:
- matchTokens
- This property must be used to list any data that can identify (match) the resource.
- partOf composition relationship
- The status service uses composition relationships to match fields that are unique only within the scope of a parent.