Client handler?

Hey folks,

I’m wondering if there’s a built in way of executing handlers on the client itself, rather than the server. So for instance, right now I have a simple check to make sure that a NAS is correctly mounted on a couple of machines. As of right now if I want to try to resolve this relatively simple error without any human intervention it seems like my only choice is to write a handler that ssh’s into the client and tries to run the mount command; however as we’re working in a multi-tenant situation, giving the Sensu server ssh access to every machine we want to monitor isn’t something I’m incredibly keen on nor very feasible (for instance right now we have a traveling exhibit working off of 4g with no real public ip address from which to SSH into barring an unreliable reverse tunnel), and on top of that a handful of machines are running Windows which means we would need some kind of ssh/winrm wrapper. It would be much simpler if the client already running on each machine had a local event handler triggered from which I could just run the command locally. Does there exist a function from which I can do something like this? Is it something other’s possibly have run across that might warrant me trying my hand at a PR? Or am I maybe just trying to get Sensu to do something outside of its scope?

There’s a slightly complex but working solution that doesn’t require ssh key exchange, it works by using Sensu remote check scheduling mechanism, usually refer to as “Sesnu Remediation”

This is the handler I use:

One of the guides I just googled:

http://thesoftjaguar.com/posts/2015/06/14/sensu-remediation/

···

On Sunday, October 16, 2016 at 9:05:40 AM UTC+3, charles...@localprojects.com wrote:

Hey folks,

I’m wondering if there’s a built in way of executing handlers on the client itself, rather than the server. So for instance, right now I have a simple check to make sure that a NAS is correctly mounted on a couple of machines. As of right now if I want to try to resolve this relatively simple error without any human intervention it seems like my only choice is to write a handler that ssh’s into the client and tries to run the mount command; however as we’re working in a multi-tenant situation, giving the Sensu server ssh access to every machine we want to monitor isn’t something I’m incredibly keen on nor very feasible (for instance right now we have a traveling exhibit working off of 4g with no real public ip address from which to SSH into barring an unreliable reverse tunnel), and on top of that a handful of machines are running Windows which means we would need some kind of ssh/winrm wrapper. It would be much simpler if the client already running on each machine had a local event handler triggered from which I could just run the command locally. Does there exist a function from which I can do something like this? Is it something other’s possibly have run across that might warrant me trying my hand at a PR? Or am I maybe just trying to get Sensu to do something outside of its scope?