fluent-plugin-influxdb-v2 1.7.0.pre.729 → 1.7.0.pre.960
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -3
- data/CHANGELOG.md +7 -1
- data/README.md +4 -0
- data/bin/influxdb-restart.sh +1 -1
- data/examples/README.md +1 -1
- data/examples/run-example.sh +1 -1
- data/fluent-plugin-influxdb-v2.gemspec +3 -2
- data/lib/fluent/plugin/out_influxdb2.rb +7 -2
- data/test/influxdb/plugin/output_test.rb +35 -0
- metadata +6 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 8e1bf6d4d8064ef174bbb91426340735a27f779f259ad3262886b90f6f3e3e88
         | 
| 4 | 
            +
              data.tar.gz: 27f9fbc7cca9d2a9b86b8fcf533c4fe582e9f1014f960f10cb15edca80186c60
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8ae1dd318e5ccd2a79902eb45f73a17a3238556e3cd0aa7b9e1e7f2c694c72d992d54a3f49eb65b9f0cee6c2df768b005372475ec50021c0eef882440c412dd2
         | 
| 7 | 
            +
              data.tar.gz: 58253e1b90ea7642db64f9ce278ef00be20defffc6fbb007836a1c7eadfd6d48c81c532b4088c901e0975310c22f682e26c2387d3ac953c2bb6148ef8cb45160
         | 
    
        data/.circleci/config.yml
    CHANGED
    
    | @@ -78,10 +78,10 @@ jobs: | |
| 78 78 | 
             
                    default: &default-ruby-image "circleci/ruby:2.6-stretch"
         | 
| 79 79 | 
             
                  influxdb-image:
         | 
| 80 80 | 
             
                    type: string
         | 
| 81 | 
            -
                    default: &default-influxdb-image "influxdb: | 
| 81 | 
            +
                    default: &default-influxdb-image "influxdb:latest"
         | 
| 82 82 | 
             
                docker:
         | 
| 83 83 | 
             
                  - image: << parameters.ruby-image >>
         | 
| 84 | 
            -
                  - image: &influx-image  | 
| 84 | 
            +
                  - image: &influx-image << parameters.influxdb-image >>
         | 
| 85 85 | 
             
                    environment:
         | 
| 86 86 | 
             
                      INFLUXD_HTTP_BIND_ADDRESS: :8086
         | 
| 87 87 | 
             
                steps:
         | 
| @@ -124,7 +124,7 @@ workflows: | |
| 124 124 | 
             
                      name: ruby-2.6
         | 
| 125 125 | 
             
                  - tests-ruby:
         | 
| 126 126 | 
             
                      name: ruby-2.6-nightly
         | 
| 127 | 
            -
                      influxdb-image: " | 
| 127 | 
            +
                      influxdb-image: "quay.io/influxdb/influxdb:nightly"
         | 
| 128 128 | 
             
                  - tests-ruby:
         | 
| 129 129 | 
             
                      name: ruby-2.5
         | 
| 130 130 | 
             
                      ruby-image: "circleci/ruby:2.5-stretch"
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,9 +1,15 @@ | |
| 1 1 | 
             
            ## 1.7.0 [unreleased]
         | 
| 2 2 |  | 
| 3 | 
            +
            ### Features
         | 
| 4 | 
            +
            1. [#23](https://github.com/influxdata/influxdb-plugin-fluent/pull/23): Added possibility to specify the certification verification behaviour
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            ### CI
         | 
| 7 | 
            +
            1. [#24](https://github.com/influxdata/influxdb-plugin-fluent/pull/24): Updated stable image to `influxdb:latest` and nightly to `quay.io/influxdb/influxdb:nightly`
         | 
| 8 | 
            +
             | 
| 3 9 | 
             
            ## 1.6.0 [2020-10-02]
         | 
| 4 10 |  | 
| 5 11 | 
             
            ### API
         | 
| 6 | 
            -
             | 
| 12 | 
            +
            1. [#15](https://github.com/influxdata/influxdb-plugin-fluent/pull/15): Default port changed from 9999 -> 8086
         | 
| 7 13 |  | 
| 8 14 | 
             
            ### Dependencies
         | 
| 9 15 | 
             
            1. [#16](https://github.com/influxdata/influxdb-plugin-fluent/pull/16): Upgrade InfluxDB client to 1.8.0
         | 
    
        data/README.md
    CHANGED
    
    | @@ -35,6 +35,7 @@ Store Fluentd event to InfluxDB 2 database. | |
| 35 35 | 
             
            | url | InfluxDB URL to connect to (ex. https://localhost:8086). | String | https://localhost:8086 |
         | 
| 36 36 | 
             
            | token | Access Token used for authenticating/authorizing the InfluxDB request sent by client. | String | |
         | 
| 37 37 | 
             
            | use_ssl | Turn on/off SSL for HTTP communication. | bool | true |
         | 
| 38 | 
            +
            | verify_mode | Sets the flags for the certification verification at beginning of SSL/TLS session. | `"#{OpenSSL::SSL::VERIFY_NONE}"` or `"#{OpenSSL::SSL::VERIFY_PEER}"` | none |
         | 
| 38 39 | 
             
            | bucket | Specifies the destination bucket for writes. | String | |
         | 
| 39 40 | 
             
            | org | Specifies the destination organization for writes. | String | |
         | 
| 40 41 | 
             
            | measurement | The name of the measurement. If not specified, Fluentd's tag is used. | String | nil |
         | 
| @@ -75,6 +76,9 @@ Store Fluentd event to InfluxDB 2 database. | |
| 75 76 | 
             
                token                   my-token
         | 
| 76 77 | 
             
                # Turn on/off SSL for HTTP communication.
         | 
| 77 78 | 
             
                use_ssl                 true
         | 
| 79 | 
            +
                # Sets the flags for the certification verification at beginning of SSL/TLS session.
         | 
| 80 | 
            +
                # For more info see - https://docs.ruby-lang.org/en/3.0.0/Net/HTTP.html#verify_mode.
         | 
| 81 | 
            +
                verify_mode             "#{OpenSSL::SSL::VERIFY_NONE}"
         | 
| 78 82 |  | 
| 79 83 | 
             
                # Specifies the destination bucket for writes.
         | 
| 80 84 | 
             
                bucket                  my-bucket
         | 
    
        data/bin/influxdb-restart.sh
    CHANGED
    
    | @@ -27,7 +27,7 @@ DEFAULT_DOCKER_REGISTRY="quay.io/influxdb/" | |
| 27 27 | 
             
            DOCKER_REGISTRY="${DOCKER_REGISTRY:-$DEFAULT_DOCKER_REGISTRY}"
         | 
| 28 28 |  | 
| 29 29 | 
             
            DEFAULT_INFLUXDB_V2_REPOSITORY="influxdb"
         | 
| 30 | 
            -
            DEFAULT_INFLUXDB_V2_VERSION=" | 
| 30 | 
            +
            DEFAULT_INFLUXDB_V2_VERSION="v2.0.4"
         | 
| 31 31 | 
             
            INFLUXDB_V2_REPOSITORY="${INFLUXDB_V2_REPOSITORY:-$DEFAULT_INFLUXDB_V2_REPOSITORY}"
         | 
| 32 32 | 
             
            INFLUXDB_V2_VERSION="${INFLUXDB_V2_VERSION:-$DEFAULT_INFLUXDB_V2_VERSION}"
         | 
| 33 33 | 
             
            INFLUXDB_V2_IMAGE=${DOCKER_REGISTRY}${INFLUXDB_V2_REPOSITORY}:${INFLUXDB_V2_VERSION}
         | 
    
        data/examples/README.md
    CHANGED
    
    
    
        data/examples/run-example.sh
    CHANGED
    
    
| @@ -47,10 +47,11 @@ Gem::Specification.new do |spec| | |
| 47 47 | 
             
              spec.required_ruby_version = '>= 2.2.0'
         | 
| 48 48 |  | 
| 49 49 | 
             
              spec.add_runtime_dependency 'fluentd', '~> 1.8'
         | 
| 50 | 
            -
               | 
| 50 | 
            +
              # Temporary depends to prerelease version - will be change to 1.12.0 after release the client
         | 
| 51 | 
            +
              spec.add_runtime_dependency 'influxdb-client', '1.12.0.pre.1894'
         | 
| 51 52 |  | 
| 52 53 | 
             
              spec.add_development_dependency 'bundler', '~> 2.0'
         | 
| 53 | 
            -
              spec.add_development_dependency 'codecov', '~> 0. | 
| 54 | 
            +
              spec.add_development_dependency 'codecov', '~> 0.1.16'
         | 
| 54 55 | 
             
              spec.add_development_dependency 'minitest', '~> 5.0'
         | 
| 55 56 | 
             
              spec.add_development_dependency 'minitest-reporters', '~> 1.4'
         | 
| 56 57 | 
             
              spec.add_development_dependency 'rake', '>= 12.3.3'
         | 
| @@ -38,6 +38,10 @@ class InfluxDBOutput < Fluent::Plugin::Output | |
| 38 38 | 
             
              config_param :use_ssl, :bool, default: true
         | 
| 39 39 | 
             
              desc 'Turn on/off SSL for HTTP communication.'
         | 
| 40 40 |  | 
| 41 | 
            +
              config_param :verify_mode, :integer, default: nil
         | 
| 42 | 
            +
              desc 'Sets the flags for the certification verification at beginning of SSL/TLS session. ' \
         | 
| 43 | 
            +
                  'For more info see - https://docs.ruby-lang.org/en/3.0.0/Net/HTTP.html#verify_mode.'
         | 
| 44 | 
            +
             | 
| 41 45 | 
             
              config_param :bucket, :string
         | 
| 42 46 | 
             
              desc 'Specifies the destination bucket for writes.'
         | 
| 43 47 |  | 
| @@ -97,8 +101,9 @@ class InfluxDBOutput < Fluent::Plugin::Output | |
| 97 101 | 
             
              def start
         | 
| 98 102 | 
             
                super
         | 
| 99 103 | 
             
                log.info  "Connecting to InfluxDB: url: #{@url}, bucket: #{@bucket}, org: #{@org}, precision = #{@precision}, " \
         | 
| 100 | 
            -
                          "use_ssl = #{@use_ssl}"
         | 
| 101 | 
            -
                @client = InfluxDB2::Client.new(@url, @token, bucket: @bucket, org: @org, precision: @precision, use_ssl: @use_ssl | 
| 104 | 
            +
                          "use_ssl = #{@use_ssl}, verify_mode = #{@verify_mode}"
         | 
| 105 | 
            +
                @client = InfluxDB2::Client.new(@url, @token, bucket: @bucket, org: @org, precision: @precision, use_ssl: @use_ssl,
         | 
| 106 | 
            +
                                                              verify_mode: @verify_mode)
         | 
| 102 107 | 
             
                @write_api = @client.create_write_api
         | 
| 103 108 | 
             
              end
         | 
| 104 109 |  | 
| @@ -117,6 +117,41 @@ class InfluxDBOutputTest < Minitest::Test | |
| 117 117 | 
             
                assert_equal '\'use_ssl\' parameter is required but nil is specified', error.message
         | 
| 118 118 | 
             
              end
         | 
| 119 119 |  | 
| 120 | 
            +
              def test_verify_mode_default
         | 
| 121 | 
            +
                driver = create_driver(%(
         | 
| 122 | 
            +
                    @type influxdb2
         | 
| 123 | 
            +
                    bucket my-bucket
         | 
| 124 | 
            +
                    org my-org
         | 
| 125 | 
            +
                    token my-token
         | 
| 126 | 
            +
                ))
         | 
| 127 | 
            +
             | 
| 128 | 
            +
                assert_nil driver.instance.verify_mode
         | 
| 129 | 
            +
              end
         | 
| 130 | 
            +
             | 
| 131 | 
            +
              def test_verify_mode_none
         | 
| 132 | 
            +
                driver = create_driver(%(
         | 
| 133 | 
            +
                    @type influxdb2
         | 
| 134 | 
            +
                    bucket my-bucket
         | 
| 135 | 
            +
                    org my-org
         | 
| 136 | 
            +
                    token my-token
         | 
| 137 | 
            +
                    verify_mode "#{OpenSSL::SSL::VERIFY_NONE}"
         | 
| 138 | 
            +
                ))
         | 
| 139 | 
            +
             | 
| 140 | 
            +
                assert_equal OpenSSL::SSL::VERIFY_NONE, driver.instance.verify_mode
         | 
| 141 | 
            +
              end
         | 
| 142 | 
            +
             | 
| 143 | 
            +
              def test_verify_mode_peer
         | 
| 144 | 
            +
                driver = create_driver(%(
         | 
| 145 | 
            +
                    @type influxdb2
         | 
| 146 | 
            +
                    bucket my-bucket
         | 
| 147 | 
            +
                    org my-org
         | 
| 148 | 
            +
                    token my-token
         | 
| 149 | 
            +
                    verify_mode "#{OpenSSL::SSL::VERIFY_PEER}"
         | 
| 150 | 
            +
                ))
         | 
| 151 | 
            +
             | 
| 152 | 
            +
                assert_equal OpenSSL::SSL::VERIFY_PEER, driver.instance.verify_mode
         | 
| 153 | 
            +
              end
         | 
| 154 | 
            +
             | 
| 120 155 | 
             
              def test_bucket_parameter
         | 
| 121 156 | 
             
                error = assert_raises Fluent::ConfigError do
         | 
| 122 157 | 
             
                  create_driver(%(
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fluent-plugin-influxdb-v2
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.7.0.pre. | 
| 4 | 
            +
              version: 1.7.0.pre.960
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jakub Bednar
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-03-04 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: fluentd
         | 
| @@ -30,14 +30,14 @@ dependencies: | |
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - '='
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: 1. | 
| 33 | 
            +
                    version: 1.12.0.pre.1894
         | 
| 34 34 | 
             
              type: :runtime
         | 
| 35 35 | 
             
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 38 | 
             
                - - '='
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version: 1. | 
| 40 | 
            +
                    version: 1.12.0.pre.1894
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 42 | 
             
              name: bundler
         | 
| 43 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -58,14 +58,14 @@ dependencies: | |
| 58 58 | 
             
                requirements:
         | 
| 59 59 | 
             
                - - "~>"
         | 
| 60 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: 0. | 
| 61 | 
            +
                    version: 0.1.16
         | 
| 62 62 | 
             
              type: :development
         | 
| 63 63 | 
             
              prerelease: false
         | 
| 64 64 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 65 | 
             
                requirements:
         | 
| 66 66 | 
             
                - - "~>"
         | 
| 67 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version: 0. | 
| 68 | 
            +
                    version: 0.1.16
         | 
| 69 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 70 70 | 
             
              name: minitest
         | 
| 71 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         |