You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handlers in the plugin collection might not work as expected due to changes in the internal event json object.
It should be possible to provide a mapping from 2.0 back to 1.4 event as a dedicated method to the Handler class, so that anyone making use of the sensu-plugin gem can keep their handlers working through the transition for native 2.0 handling.
Where to place the mapping logic for handlers
Call method in Handler initialize. Maybe also wrap logic with a boolean argument so that handler users will have to explicitly enable remapping if its desired.
When to engage mapping method?
if handler doesn't support 2.0 data natively
or
if handler was explicitly told to engage mapping via cmdline argument
How can you tell its a 2.0 data packet?
If entity key is populated and client key is not
Mapping so far
This list could change has more testing and reviews are done.
Non-Destructive Mapping 2.0 -> 1.4
These should be save re-mapping actions as they regenerate missing json keys.
This changes will cause a break in 2.0 event handling. Not clear if this is needed to keep existing handlers in the collection working.
reformat check.history
Unknown Mapping
Its not clear on first inspection how to repopulate these 1.4 event keys. Not clear if these are needed to get existing handlers in the collection working.
action
last_state_change
silenced
silenced_by
The text was updated successfully, but these errors were encountered:
Problem
Handlers in the plugin collection might not work as expected due to changes in the internal event json object.
It should be possible to provide a mapping from 2.0 back to 1.4 event as a dedicated method to the Handler class, so that anyone making use of the sensu-plugin gem can keep their handlers working through the transition for native 2.0 handling.
Where to place the mapping logic for handlers
Call method in Handler initialize. Maybe also wrap logic with a boolean argument so that handler users will have to explicitly enable remapping if its desired.
When to engage mapping method?
if handler doesn't support 2.0 data natively
or
if handler was explicitly told to engage mapping via cmdline argument
How can you tell its a 2.0 data packet?
If entity key is populated and client key is not
Mapping so far
This list could change has more testing and reviews are done.
Non-Destructive Mapping 2.0 -> 1.4
These should be save re-mapping actions as they regenerate missing json keys.
Destructive Mapping
This changes will cause a break in 2.0 event handling. Not clear if this is needed to keep existing handlers in the collection working.
Unknown Mapping
Its not clear on first inspection how to repopulate these 1.4 event keys. Not clear if these are needed to get existing handlers in the collection working.
The text was updated successfully, but these errors were encountered: