1
votes

Could you please help me understand the difference between sensu-plugin and sensu-extension.

I believe I can create sensu-plugin 'checks' as ruby gem. Can I also create 'check' extension as a gem and just install it in sensu ruby?

2

2 Answers

2
votes

Sensu plugins are simply stand-alone commands that are executed by the sensu server on demand - They can be executed directly through command line for testing or experimentation. At its simplest a sensu-plugin is any application which returns a single line of output and an conventional exit code (0:ok, 1:warn, 2:critical, 3:unknown 4+: invalid (unknown))

Sensu Extensions differ in that they are included into the sensu process loop itself during runtime - this means they're faster and can interact with some sensu systems directly, but may compromise the stability of the sensu-client.

Extensions can also be used to create or manage long term processes, such as SNMP-Traps or opening sockets for connections.

0
votes

To add on to the answer pasted, extensions run as part of same process as that of sensu so if extensions break, it breaks the sensu process however that's not the case with Plugins.

The latest version allows to install extensions as gem