sensu-plugins / sensu-plugin

A framework for writing Sensu plugins & handlers with Ruby.
http://sensuapp.org
MIT License
126 stars 117 forks source link

Support/standardise stdin plugins #184

Open absolutejam opened 6 years ago

absolutejam commented 6 years ago

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

Anything else to suggest?