Events
Various events are emitted to the Fix Inventory event bus.
It is possible to create custom automations that react to these events by defining jobs.
External components can also subscribe to the event bus via the websocket API.
Cloud Data Sync Events​
Fix Inventory continuously synchronizes cloud data to ensure that you always have the latest information about your cloud resources.
collect_and_cleanup
Workflow Events​
The collect_and_cleanup
workflow is triggered every hour by default.
collect
Events​
In the collect
phase, resources are collected from all configured cloud provider and synchronized with the internal graph. At the conclusion of this phase, the graph database contains the latest state of all resources.
Event Name | Event Description |
---|---|
pre_collect | This event is emitted before collection is started. |
collect | Resource collectors listen on this event to begin resource collection. |
merge_outer_edges | This event is emitted after collection is done. |
post_collect | This event is emitted after all outer edges have been merged. Custom logic to react to resource changes should define this event as the trigger. |
cleanup_plan
Events​
During the cleanup_plan
phase, Fix Inventory computes which resources should be cleaned up, and marks them for deletion during the subsequent cleanup
phase.
Fix Inventory has cleanup infrastructure apps that can be installed and scheduled to run during the cleanup_plan
phase.
Event Name | Event Description |
---|---|
pre_cleanup_plan | This event is emitted before the cleanup is planned. |
cleanup_plan | Cleanup infrastructure apps can listen on this event. |
post_cleanup_plan | This event is emitted after the cleanup is planned. |
cleanup
Events​
In the cleanup
phase, all resources marked for cleanup are deleted if cleanup is enabled.
Resources are deleted in the order mandated by their dependencies and relationships to other resources.
Event Name | Event Description |
---|---|
pre_cleanup | This event is emitted before the cleanup is performed. |
cleanup | Resource collectors listen on this event to delete resources marked for cleanup. |
post_cleanup | This event is emitted after the cleanup is performed. |
generate_metrics
Events​
As its name suggests, metrics are generated and provided to the time-series database during the generate_metrics
phase.
In this phase, Fix Inventory performs several queries to get updated metrics. Since the incoming data will only change during the next collect run, metrics are generated here and cached until the next collection.
Event Name | Event Description |
---|---|
pre_generate_metrics | This event is emitted before metrics are generated. |
generate_metrics | Metrics generation begins when this event is emitted. |
post_generate_metrics | This event is emitted after metrics are generated. |
Fix Inventory internal events​
Fix Inventory also has a set of internal events that are emitted.
Web Socket Connection Events​
Event Name | Event Description |
---|---|
message-listener-connected | Whenever a new listener attaches to the event bus, this event is emitted. |
message-listener-disconnected | Whenever an existing listener drops the connection to the event bus, this event is emitted. |
Configuration Events​
Event Name | Event Description |
---|---|
config-updated | Any config that is updated via the config service will emit such an event. |
config-deleted | Any config that is deleted via the config service will emit such an event. |
Task Events​
When jobs or workflows are executed, they run as tasks inside Fix Inventory. A task can produce the following events:
Event Name | Event Description |
---|---|
task_started | The task has been started. |
progress | Longer running tasks may produce progress update events. |
task_end | The task has ended. |