How to connect to sql server
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc các Dockerfile và fluent.conf được cung cấp, sau đó tái hiện các lỗi tải adapter trong thiết lập container Fluentd đã nêu. Theo dõi cách cấu hình của fluent-plugin-sql tải tiny_tds hoặc activerecord-sqlserver-adapter; hoàn tất khi adapter đã cấu hình được tải và SQL match có thể kết nối với SQL Server.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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>
- Ngôn ngữ chính
- Ruby
- Star
- 112
- Fork
- 58
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fluent/fluent-plugin-sql
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
fluent/fluent-plugin-sql#151 · 1 bình luận ·
-
Writing custom select queries Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
fluent/fluent-plugin-sql#149 ·
-
bug needs-investigation
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
fluent/fluent-plugin-sql#141 · 1 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
fluent/fluent-plugin-sql#138 · 1 bình luận ·
-
Missing Copyright and License Đang mở
fluent/fluent-plugin-sql#134 · 6 bình luận · 1 người được giao ·
Tất cả issue của fluent/fluent-plugin-sql
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Please Drop ruby 3.2 support Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
googleapis/google-api-ruby-client#28001 · 5 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100