Sha256: 98bf1920d0c46a095c47e75089736d9ac0a899e0b9038bd55425f250f7ca41d8

Contents?: true

Size: 1.91 KB

Versions: 4

Compression:

Stored size: 1.91 KB

Contents

= Amazon SNS output plugin for Fluent

== Install
 $ gem install fluent-plugin-sns

== Component

=== SNSOutput

Send fluent-event as message to amazon SNS.

== Configuratin

=== SNSOutput

    <match sns.**>

      type sns

      # following attibutes are required

      sns_topic_name {sns_topic_name}

      # following attibutes are required if you don't use IAM Role nor export credentials to ENV

      aws_key_id {your_aws_key_id}
      aws_sec_key {your_aws_secret_key}

      # following attibutes are optional

      sns_endpoint {endpointURL}

      ### endpoint list ###
      # Asia Pacific (Tokyo) [Default] : sns.ap-northeast-1.amazonaws.com
      # Asia Pacific (Singapore)       : sns.ap-southeast-1.amazonaws.com
      # US-East (Virginia)             : sns.us-east-1.amazonaws.com
      # US-West (Oregon)               : sns.us-west-2.amazonaws.com
      # US-West (N.California)         : sns.us-west-1.amazonaws.com
      # EU-West (Ireland)              : sns.eu-west-1.amazonaws.com
      # South America (São Paulo)      : sns.sa-east-1.amazonaws.com

      sns_subject_template {template_erb_file_path}
      sns_subject_key {sns_subject_key}
      sns_subject {sns_subject} #constant subject

      sns_body_template {sns_body_template}
      sns_body_key {sns_body_key}

      proxy http(s)://{url}:{port}

    </match>

== Example

=== fluentd.conf

    <match sns.**>

      type sns

      sns_topic_name example
      
      sns_endpoint sns.ap-northeast-1.amazonaws.com

      sns_subject_key from
      sns_body_template /path/to/template/body_template.erb

    </match>

=== template

/path/to/template/body_template.erb
    hello <%= record['to'] %>!

=== sample input

    $ echo '{"from":'Alice',"to":"Bob" }' | fluent-cat sns.example

Then, the message is published. (subject -> 'Alice', body -> 'hello Bob!')

== Copyright

Copyright:: Copyright (c) 2011- Yuri Odagiri
License::   Apache License, Version 2.0

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fluent-plugin-sns-2.1.7 README.rdoc
fluent-plugin-sns-2.1.6 README.rdoc
fluent-plugin-sns-2.1.5 README.rdoc
fluent-plugin-sns-2.1.4 README.rdoc