Fluentd with drual 8
-
Upload
yoshikazu-aoyama -
Category
Technology
-
view
347 -
download
2
Transcript of Fluentd with drual 8
Fluentd with Drupal Rest API
Yoshikazu Aoyama
自己紹介 青山 義万 ( あおやま よしかず ) twitter: @blauerberg drupal.org: blauerberg Drupal 歴 : 6 年くらい (4.x ~ )
LTのテーマ : Fluentd と D8 の組み合わせで何かやる Drupal 8 から core だけで Rest API が作れるようになったので、 Fluentd から
Drupal 8 に Rest API 経由でデータを登録してみます。
Rest API
Raw Input
やらないといけない事 fluentd の入力を Drupal の Rest API が理解できる形に変換して出力する
Rest API
Raw Input
http://www.fluentd.org/plugins とかにすでにあるんじゃないの? 誰もそんなマイナーな plugin は作ってないようです ..
fluent-plugin-drupal-rest
5 時間前から絶賛開発中!
fluent-plugin-drupal-rest
Outputinput
in_http
in_tail
in_exec
in_****
out_drupal
Fluentd の初期設定 sudo apt-get install –y ruby ruby-dev sudo gem install fluentd cd ~ fluentd –setup fluent cd fluent edit fluentd.conf sudo fluentd -c ~/fluent/fluent.conf -p ~/fluent/plugin -vv
fluentd.conf<match drupal.**> @type drupal_rest @id drupal_test host http://192.168.x.x port 80 content_type article auth basic basic_auth_user admin basic_auth_pass notasecret</match>
Drupal 8 で Rest API を使うための初期設定
Drupal 8 で Rest API を使うための初期設定 cd {your_drupal_root}/sites/default curl -O
https://gist.githubusercontent.com/blauerberg/53486ecea3fd20e0ee77/raw/e66580576c03639f5f69602c7a1ac393b539c081/rest.settings.yml
https://www.drupal.org/node/2098511
demo in_http と fluent-cat in_tail からデータを流し込む
まとめ Drupal 8 は Rest API が開発なしですぐに使えます fluent-plugin-drupal-rest 近日公開? Drupal ONSEN でお披露目するとかしないとか