Remediation not executed my command after nginx down

type: CheckConfig
api_version: core/v2
metadata:
namespace: default
name: Automate_Now
labels:
foo: bar
annotations:
io.sensu.remediation.config.actions: |
[
{
“description”: “Perform this action once after Nginx has been down for 30 seconds.”,
“request”: “systemctl-start-nginx”,
“occurrences”: [ 3 ],
“severities”: [ 1,2 ]
},
{
“description”: “Perform this action once after Nginx has been down for 120 seconds.”,
“request”: “systemctl-restart-nginx”,
“occurrences”: [ 12 ],
“severities”: [ 1,2 ]
}
]
spec:
command: “check-http.rb -u http://x.x.x.x:80/
handlers:

  • remediation
    high_flap_threshold: 0
    interval: 10
    low_flap_threshold: 0
    publish: true
    runtime_assets:
  • sensu-plugins-http
  • sensu/sensu-ruby-runtime
    subscriptions:
  • webserver
  • linux

Can you describe the actual problem here?

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…