ternandsparrow / swarm-rest

RESTful HTTP API serving up Ausplots data. You probably don't want to hit this endpoint directly. If you want our data, use the R package: https://github.com/ternaustralia/ausplotsR/
http://swarmapi.ausplots.aekos.org.au/
0 stars 0 forks source link

Add log monitoring #9

Open tomsaleeba opened 4 years ago

tomsaleeba commented 4 years ago

We have uptime monitoring but we also need to monitor the logs to see how often we get non-200 responses.

Ideally we would get a notification if we cross some threshold of error-ish HTTP status codes.

Graylog is one option. Need to research some others.

tomsaleeba commented 4 years ago

This tool might work: https://github.com/move-elevator/sentry-log-pusher. It's 4 years old but log formats haven't changed.

We could also use Fluentd and use this plugin to send events to Sentry. As asked here.

tomsaleeba commented 4 years ago

There is also fluent-bit, which is a lightweight alternative to fluentd. Unsure if it works with the plugin linked above.

tomsaleeba commented 4 years ago

Caddy already outputs logs in JSON format, so it would be easy to write a NodeJS consumer of those logs that then sends items to Sentry. Plus Caddy is easier to configure for HTTPS in Docker.