planetary-social / ansible-scripts

Ansible automation scripts used at Planetary
MIT License
2 stars 3 forks source link

Sentry adjustment: drop deployment, add metrics #68

Closed cooldracula closed 6 months ago

cooldracula commented 6 months ago

This PR revises the sentry playbook to comment out the sections around deploying and add in a task for collecting uptime metrics.

For the deployment side, we don't use ansible for deploying sentry since sentry has its own instlal script and the way it is run makes it hard to do with ansible (namely that it takes a long time and it is hard to maintain the ssh connection without timing out). To reduce the chance for error, and make explicit that we are installing it using sentry's own install method, we comment out the deployment section. The tasks are still useful as documentation, which is why they are not fully deleted.

For the metric: we want a health check and alert for the sentry service. Luckily, sentry provides that at the endpoint /_health. This PR adds tasks to extend the node-exporter already on the server to use it's text-collector exporter, which allows for customized metrics to be added. We then add a shell script that just checks the status code of /health. This lets us set up an alert for if /health returns anything other than 200.