Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

Store application logs in a central location #132

Closed
nickclyde opened this issue Aug 24, 2017 · 8 comments
Closed

Store application logs in a central location #132

nickclyde opened this issue Aug 24, 2017 · 8 comments
Assignees

Comments

@nickclyde
Copy link
Contributor

From the roadmap:

Centralized logging

  • Thesis: should not need to ssh into instance (danger-danger)
  • Scope: instance level, application level
  • Current-state: Leverage Runit, built-in ability to log to a port
  • Elements: app_id, instance_id
  • UI needs: expose logs to UI (hold-off)
  • References: Kibana, #engineering-chat
  • [shorter-term] considerations: not designing out certain logging providers
  • [longer-term] Considerations: PII scrubbing
  • Gov-connection: PII (SSNs, TINs, Names, Emails, DOBs, etc.)

svlogd allows us to send application logs over a port. That's easy enough, but we need to decide what to send those logs into that allows us to expose the logs to the UI or allow the user to use their own log viewing application/service. Kibana seems more suited to data visualization than log parsing; however, Elastic does offer Logstash, which is billed as a centralized log processor that can output to Elasticsearch or a number of other destinations like Redis, S3 or even a HTTP endpoint or a websocket.

Logstash also offers a library of filters that can do things like "anonymize PII data and exclude sensitive fields completely", which we talked about above.

I think Logstash might be good for us, but I'm a little less certain on where the final datastore should be. @paulsmith @llimllib thoughts?

Logstash Github page

@nickclyde nickclyde self-assigned this Aug 24, 2017
@llimllib
Copy link
Contributor

llimllib commented Aug 24, 2017

img_0002

Is this roughly the architecture you’re imagining?

(forgive my chickenscratch)

@nickclyde
Copy link
Contributor Author

Yep, that looks about right!

@llimllib
Copy link
Contributor

👍 that seems like the way to go to me

@malford
Copy link

malford commented Aug 24, 2017

FWIW I implemented a EFK (elasticsearch, fluentd, kibana) stack earlier this year at my previous role. It uses fluentd for log forwarding. Fluentd is ruby based and has a bit lower memory footprint and uses tags instead statements for forwarding. The supported endpoint options are about the same as logstash and seems to have good community support.

@llimllib
Copy link
Contributor

Also rsyslog can ship logs directly to elasticsearch. Could we do that as a first cut, and cut out the middleman entirely?

@llimllib
Copy link
Contributor

http://wiki.rsyslog.com/index.php/HOWTO:_rsyslog_%2B_elasticsearch

pros:

  • less infrastructure (logstash requires a server and redis; fluentd requires a server)
  • higher performance (no need to travel through a middleman)

cons:

  • no ability to filter/alert/tag what have you at the logstash/fluentd level

what else would you add to these?

@nickclyde
Copy link
Contributor Author

fluentd looks nice as well. Maybe though, it would be good to do as @llimllib mentioned and cut out the middleman for now until we have a concrete need for filtering?

@paulsmith
Copy link
Contributor

paulsmith commented Aug 24, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants