sensu-plugins / sensu-plugins-stackstorm

Sensu plugins for StackStorm
http://sensu-plugins.io
MIT License
3 stars 4 forks source link

Reimplement st2_handler in Ruby #3

Open userlocalhost opened 6 years ago

userlocalhost commented 6 years ago

Backgroun

The Handler of st2_handler is wrapped by Ruby but the main processing is implemented in Python because this is ported from the stackstorm-sensu which is a project written by the Python.

Problem

The sensu plugin installer (sensu-install) doesn't install the Python libraries on which the st2 handler depends at the installation. So a runtime error may be occurred because of the failure of importing libraries.

Proposal

If the we could specify the handler which is called after the gem installation (like the postinst script of debian-package) in the gemspec, this problem would be solved easily, I think. But we can't specify that kind of script as far as I know.

So I would like to reimplement the st2_handler in Ruby.

majormoses commented 6 years ago

I have not done it myself but from what I read you can probably accomplish this through a post install hook but this does add the requirement of a c compiler I believe as it needs to be executed as an extension? @eheydrick have you any other insight into that?