How to connect to sql server
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
まず提供された Dockerfile と fluent.conf を読み、次に指定された Fluentd コンテナー構成でアダプターの読み込みエラーを再現します。fluent-plugin-sql の構成が tiny_tds または activerecord-sqlserver-adapter をどのように読み込むかを追跡します。設定されたアダプターが読み込まれ、SQL match が SQL Server に接続できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I have tried installing tiny_tds, also tried activerecord-sqlserver-adapter but both give me the following error:
2019-10-14 07:21:34 +0000 [error]: #0 fluent/log.rb:362:error: Could not load the 'tiny_tds' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile. path=nil error_class=LoadError error="Could not load the 'tiny_tds' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile."
2019-10-14 07:21:34 +0000 [error]: #0 fluent/log.rb:362:error: Could not load the 'activerecord-sqlserver-adapter' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile. path=nil error_class=LoadError error="Could not load the 'activerecord-sqlserver-adapter' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile."
Dockerfile:
# AUTOMATICALLY GENERATED
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb
FROM alpine:3.9
LABEL maintainer "Fluentd developers <fluentd@googlegroups.com>"
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.7.3"
# Do not split this into multiple RUN!
# Docker creates a layer for every RUN-Statement
# therefore an 'apk delete' has no effect
RUN apk update \
&& apk add --no-cache \
ca-certificates linux-headers \
ruby ruby-irb ruby-etc ruby-webrick \
tini \
&& apk add --no-cache --virtual .build-deps \
build-base \
ruby-dev gnupg \
&& apk add freetds freetds-dev \
&& echo 'gem: --no-document' >> /etc/gemrc \
&& gem install tiny_tds -v 2.1.0 \
&& gem install fluent-plugin-sql -v 1.1.1 \
&& gem install activerecord-sqlserver-adapter -v 5.2.0 \
&& gem install oj -v 3.3.10 \
&& gem install json -v 2.2.0 \
&& gem install async-http -v 0.46.3 \
&& gem install fluentd -v 1.6.3 \
&& gem install bigdecimal -v 1.3.5 \
&& apk del .build-deps \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
RUN addgroup -S fluent && adduser -S -g fluent fluent \
# for log storage (maybe shared with host)
&& mkdir -p /fluentd/log \
# configuration/plugins path (default: copied from .)
&& mkdir -p /fluentd/etc /fluentd/plugins \
&& chown -R fluent /fluentd && chgrp -R fluent /fluentd
COPY fluent.conf /fluentd/etc/
COPY entrypoint.sh /bin/
ENV FLUENTD_CONF="fluent.conf"
ENV LD_PRELOAD=""
EXPOSE 24224 5140
USER fluent
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
CMD ["fluentd"]
conf
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
<match **>
@type stdout
</match>
<match *>
@type sql
host ...
port 1433
database fluentd
adapter tiny_tds / activerecord-sqlserver-adapter
username ...
password ...
<table>
table dbo.logs
column_mapping 'timestamp:created_at,fluentdata1:dbcol1,fluentdata2:dbcol2,fluentdata3:dbcol3'
# This is the default table because it has no "pattern" argument in <table>
# The logic is such that if all non-default <table> blocks
# do not match, the default one is chosen.
# The default table is required.
</table>
</match>
- 主要言語
- Ruby
- スター
- 112
- フォーク
- 58
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fluent/fluent-plugin-sql のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
fluent/fluent-plugin-sql#151 · コメント 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
fluent/fluent-plugin-sql#149 ·
-
bug needs-investigation
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
fluent/fluent-plugin-sql#141 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
fluent/fluent-plugin-sql#138 · コメント 1 件 ·
-
fluent/fluent-plugin-sql#134 · コメント 6 件 · 担当者 1 名 ·
fluent/fluent-plugin-sql の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
riscv/riscv-unified-db#2626 ·
-
Component: GLib
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
ds-drift
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
we-promise/sure#3693 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
simp/pupmod-simp-simp#395 ·