Command execution

Hi Team, I am new to this sensu go and my organization too.
I want solution:
I have two servers from AWS and one is installed nginx with sensu agent and one is installed sensu-backend.
I want to start if nginx is stop, Through sensu-backend by pusing the command. Is that possible on our sensu go and please help me to find out the solution.

Yes, it is possible. You can use the remediation handler and create a remediation check for restarting the nginx server. You can find the process for creating remediation checks from https://github.com/sensu/sensu-remediation-handler

Thank you Ganesh, I Using this but remediation check is published so, it’s running the command everytime and I want to run the remediation check when…nginx is not responding 200 is failed mean…it has to run…

Did you try to use Check Hooks?

We are using them in order to restart some service.
Since the sensu user doesn’t have the access right to restart services with systemctl, we had to use some sudo rules, but so far it’s working OK

@Sathish the remediation check should be unpublished. By publishing it, you’re guaranteeing that it will run if you want it to or not. It must be unpublished so that when the remediation handler makes its API call, the check is only run once.

Yes, that’s correct @aaronsachs. Now it’s working fine.

No, I try this too…