I’m working on integration on rundeck + sensu and i have ngnix webserver installed,i would like to monitor the http url status of ngnix on sensu and add annotation and webhooks to run the rundeck job automatically when ngnix process is down.
Can someone please be able to provide the script or yaml/json file to monitor the http check and i can test it.
Thanks in advance.
Thanks
Shamya
What have you already tried? Please include links to gists and/or code blocks (if relatively small)
i’ve tried this example and tried adding the asset with sensuctl but i get parsing erros.
type: CheckConfig
api_version: core/v2
metadata:
annotations: sensu.io/plugins/sensu-rundeck-handler/config/actions: |
[
{
“webhook”: “8TlVUt1CQcbD3K5fiGGKNR1zBg7lnZsS#RestartNGINX”,
“occurrences”: [ 3 ],
“severities”: [ 1, 2 ]
},
{
“rundeck_job”: “37044c9f-79e2-435e-bc03-db81995cc99e”,
“occurrences”: [ 6 ],
“severities”: [ 1, 2 ]
}
]
spec:
handlers:
sensu-rundeck-handlers
Tell us about your setup, this should include OS, version of Sensu, version of Sensu components (redis, rabbitmq), plugin versions (if applicable), anything special about your setup such as an airgapped network or strict ACLs
I have rundeck on ubuntu vm1,ngnix,sensu go running on ubuntu vm2
NOTE: The Rundeck handler requires a valid Sensu license to be installed. If you do not have a license, you will need to request a trial license. You will have to contact sales for this.
The rest of these instructions assume you have Rundeck up and running and that it has:
The node (vm2) defined
A job configured that can restart NGINX on the node (test this by manually running the job)
A webhook configured to execute the above job and that it has the Node Filter set to name: ${data.entity.metadata.name}
I’ve followed your instructions and added the http-checks successfully.
I tried to test it by bringing down the ngnix but seems like entity is not down(see attached).
I don’t have Rundeck and SensuGo licenses. For this integration setup to be working do i install the both the licenses.
Please advise.
Below is my setup.
I have rundeck on ubuntu vm1
ngnix,sensu go running on ubuntu vm2 - is this setup works?
I’ve contacted the Sensu support team to provide the license file.
Hopefully they get back to me.
I couldn’t able to test the rundeck job(ngnix restart) itself on rundeck because it says project execution is disabled even though i tried to activate it goes back to disabled automatically.
I’m guessing this because of no licenses.