Last active
March 13, 2017 05:35
-
-
Save hatt/6552408 to your computer and use it in GitHub Desktop.
Dynamically scoping Redis with AWS Elasticache to use the local availability zone. Batch writing is used for the shipper to reduce usage costs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$redis_host = $::ec2_placement_availability_zone ? { | |
'us-west-1a' => 'logging-redis-a.<redacted>.0001.usw1.cache.amazonaws.com', | |
'us-west-1b' => 'logging-redis-b.<redacted>.0001.usw1.cache.amazonaws.com' | |
} | |
logstash::output::redis { 'redis-shipper': | |
batch => true, | |
host => $redis_host, | |
key => 'logstash', | |
data_type => 'list' | |
} | |
logstash::input::redis { 'redis-indexer': | |
host => $redis_host, | |
key => 'logstash', | |
data_type => 'list' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Valuable insight from this config by @hatt:
Thanks Mr Hatt!