GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
616 stars 98 forks source link

Drain logs from cloud.gov spaces to AWS Elasticsearch instance #2921

Closed mogul closed 3 years ago

mogul commented 3 years ago

User Story

In order to support data.gov's needs for monitoring and alerting on app behavior, the data.gov team wants to drain logs from cloud.gov spaces to a brokered instance of AWS ES.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

Background

[Any helpful contextual notes or links to artifacts/evidence, if needed]

Security Considerations (required)

This story configures cloud.gov's platform-provided logging facilities to send logs from our spaces to a cloud.gov-brokered instance of AWS Elasticsearch. We assume that cloud.gov has ensured that the communication mechanisms are secured with TLS, and that client credentials are used for accessing the AWS ES endpoints; this should be verified. If IP restrictions are in place (eg only the cloud.gov egress IP ranges are permitted), then we should be noting that and documenting how to access the Kibana UI in our runbook. (Even if cloud.gov does not apply IP restrictions on its own, we should consider whether we want to add them ourselves.)

Note that AWS ES should be configured to prevent modifications of records in accordance with AU-9 if possible. If that's not possible, we may want to investigate how to also drain logs to CloudWatch Logs; this would likely happen via a separate issue.

Sketch

mogul commented 3 years ago

Need to make a decision on Fluent Bit vs LogStash

adborden commented 3 years ago

notes to self:

Take a look at the logstash configs available from https://github.com/cloudfoundry-community/logsearch-for-cloudfoundry

How do we push our indexing config?

adborden commented 3 years ago

Memory calculation for Logstash https://github.com/cloudfoundry/java-buildpack-memory-calculator

mogul commented 3 years ago

And now, Brand X. https://sematext.com/docs/logagent/ https://sematext.com/docs/logagent/input-plugin-cloudfoundry/ https://sematext.com/docs/logagent/output-plugin-aws-elasticsearch/