Skip to content

Instantly share code, notes, and snippets.

@mrballcb
Last active December 14, 2017 16:43
Show Gist options
  • Save mrballcb/47e95eb379b3d1fbbe93885edefc6047 to your computer and use it in GitHub Desktop.
Save mrballcb/47e95eb379b3d1fbbe93885edefc6047 to your computer and use it in GitHub Desktop.
Multiple rabbitmq logstash output pipeline
output {
rabbitmq {
exchange => "${RABBITMQ_EXCHANGE}"
exchange_type => "direct"
key => "%{[driftwood][rabbitmq][key]}"
host => "${RABBITMQ_BOOTSTRAP_SERVER_BLUE}"
user => "${logstash_user}"
password => "${logstash_pass}"
}
# Backup stack if blue goes down
# rabbitmq {
# exchange => "${RABBITMQ_EXCHANGE}"
# exchange_type => "direct"
# key => "%{[driftwood][rabbitmq][key]}"
# host => "${RABBITMQ_BOOTSTRAP_SERVER_GREEN}"
# user => "${logstash_user}"
# password => "${logstash_pass}"
# }
# Detected message that this dev team requests also get sent to SumoLogic
if [driftwood][sumologic][category] {
rabbitmq {
exchange => "${RABBITMQ_EXCHANGE}"
exchange_type => "direct"
key => "${RABBITMQ_KEY_SUMOLOGIC}"
host => "${RABBITMQ_BOOTSTRAP_SERVER_BLUE}"
user => "${logstash_user}"
password => "${logstash_pass}"
}
# Debugging: Separate log of just events destined for SumoLogic
# file {
# path => "/tmp/to_sumo.log"
# }
}
# Debugging: To make sure events getting to output stage
file {
path => "/tmp/debug.log"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment