Example Updates: - `../example/main.tf` README Updates: - `byo-cloudwatch-log-sharing/target-account-firehose/.header.md` - `byo-cloudwatch-log-sharing/target-account-firehose/README.md` - `byo-file-carving/target-account/README.md` - `byo-firehose-logging-destination/target-account/README.md` - `logging-destination-datadog/.header.md` - `logging-destination-datadog/README.md` - `logging-destination-firehose/README.md` - `logging-destination-snowflake/.header.md` - `logging-destination-snowflake/README.md` - `logging-destination-splunk/.header.md` - `logging-destination-splunk/README.md` - `okta-conditional-access/.header.md` - `okta-conditional-access/README.md` - `osquery-carve/README.md` - `../byo-vpc/example/README.md` - `../byo-vpc/example/main.tf` - `../example/README.md`
92 lines
2.9 KiB
Markdown
92 lines
2.9 KiB
Markdown
# Logging Destination: Splunk
|
|
|
|
This addon configures AWS Kinesis Firehose to send Fleet's osquery logs to Splunk. It creates:
|
|
|
|
1. Kinesis Firehose delivery streams for each log type (results, status, and audit)
|
|
2. A single S3 bucket for storing all failed delivery attempts
|
|
3. IAM roles and policies for the Firehose streams to access the S3 bucket
|
|
4. An IAM policy for Fleet to access the Firehose streams
|
|
|
|
## How to use
|
|
|
|
```hcl
|
|
module "splunk-logging" {
|
|
source = "github.com/fleetdm/fleet-terraform//addons/logging-destination-splunk?depth=1&ref=tf-mod-addon-logging-destination-splunk-v1.0.1"
|
|
|
|
s3_bucket_config = {
|
|
name_prefix = "fleet-splunk-failure"
|
|
expires_days = 5
|
|
}
|
|
|
|
log_destinations = {
|
|
results = {
|
|
name = "fleet-osquery-results-splunk"
|
|
hec_endpont = "https://http-inputs-mydomain.splunkcloud.com:443"
|
|
hec_token = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A"
|
|
hec_acknowledgement_timeout = 600
|
|
hec_endpoint_type = "Raw"
|
|
s3_buffering_size = 10
|
|
s3_buffering_interval = 400
|
|
s3_error_output_prefix = "results/"
|
|
},
|
|
status = {
|
|
name = "fleet-osquery-status-splunk"
|
|
hec_endpont = "https://http-inputs-mydomain.splunkcloud.com:443"
|
|
hec_token = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A"
|
|
hec_acknowledgement_timeout = 600
|
|
hec_endpoint_type = "Raw"
|
|
s3_buffering_size = 10
|
|
s3_buffering_interval = 400
|
|
s3_error_output_prefix = "status/"
|
|
},
|
|
audit = {
|
|
name = "fleet-audit-splunk"
|
|
hec_endpont = "https://http-inputs-mydomain.splunkcloud.com:443"
|
|
hec_token = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A"
|
|
hec_acknowledgement_timeout = 600
|
|
hec_endpoint_type = "Raw"
|
|
s3_buffering_size = 10
|
|
s3_buffering_interval = 400
|
|
s3_error_output_prefix = "audit/"
|
|
}
|
|
}
|
|
}
|
|
|
|
```
|
|
|
|
Then you can use the module's outputs in your Fleet configuration:
|
|
|
|
```hcl
|
|
module "fleet" {
|
|
source = "github.com/fleetdm/fleet-terraform?depth=1&ref=tf-mod-root-v1.26.1"
|
|
certificate_arn = module.acm.acm_certificate_arn
|
|
|
|
vpc = {
|
|
name = local.vpc_name
|
|
# azs = ["us-east-2a", "us-east-2b", "us-east-2c"]
|
|
}
|
|
|
|
fleet_config = {
|
|
image = "fleetdm/fleet:v4.70.1"
|
|
autoscaling = {
|
|
min_capacity = 2
|
|
max_capacity = 5
|
|
}
|
|
mem = 4096
|
|
cpu = 512
|
|
extra_environment_variables = merge(
|
|
local.fleet_environment_variables,
|
|
# Uncomment to enable Splunk logging
|
|
module.splunk-logging.fleet_extra_environment_variables
|
|
)
|
|
extra_iam_policies = concat(
|
|
# Uncomment to enable Splunk logging
|
|
module.splunk-logging.fleet_extra_iam_policies,
|
|
)
|
|
}
|
|
|
|
# ... other Fleet configuration ...
|
|
}
|
|
```
|
|
|