So, v1.1.0 brought about the new stdin check attribute, which I for one completely missed until recently. However, I see some awesome possibilities presented with this feature as it presents the ability to parse richer data structures (Which I've been dying for!).
Check STDIN. A boolean check definition attribute, "stdin", when set to true instructs the Sensu client to write JSON serialized Sensu client and check definition data to the check command process STDIN. This attribute cannot be used with existing Sensu check plugins, nor Nagios plugins etc, as the Sensu client will wait indefinitely for the check process to read and close STDIN.
Now, to best support this style of check, we'll need to provide some changes to the base class. Once we've decided here, I can also implement in sensu-plugins-python too.
Proposed
Require the --stdin flag to differentiate between a regular check and stdin, as both modes can be supported by the same check.
Require/suggest a method of storing 'required' and 'optional' JSON fields.
Provide examples and example tests for plugin developers.
@majormoses This could also link in with discussions we've had about improving metadata on plugins?
So,
v1.1.0
brought about the newstdin
check attribute, which I for one completely missed until recently. However, I see some awesome possibilities presented with this feature as it presents the ability to parse richer data structures (Which I've been dying for!).Now, to best support this style of check, we'll need to provide some changes to the base class. Once we've decided here, I can also implement in
sensu-plugins-python
too.Proposed
--stdin
flag to differentiate between a regular check and stdin, as both modes can be supported by the same check.Anything else to suggest?