Norikraã®APIãå©ãmrbgemãæ¸ãã¦ãmod_mrubyã§ä½¿ã
FluentdããNorikraã«ãµã¼ãã®å種ãã°ãæµãè¾¼ãã§è§£æãããã¨ããã®ã¯ã å²ã¨ããããNorikraã®ã¦ã¼ã¹ã±ã¼ã¹ãã¨æãã¾ãã
Norikra+FluentdでDoS攻撃をブロックする仕組みを作ってみた | Developers.IO
FluentdとNorikraで異常アクセス検知を行う | ピコもん開発ブログ
ãããã¯ãããã¹ãã¨ãã¦åºåããã¦ãããã°ãã¡ã¤ã«ãFluentdã§åãè¾¼ãã§éä¿¡ã¨ãªãã¾ããã ApacheãNginxã®ã¢ã¯ã»ã¹ãã°ãNorikraã«æºãè¾¼ãã®ãªãã 以ä¸ã®mrbgemãmod_mrubyãnginx_mrubyã«çµã¿è¾¼ãã§ããã°ã§ãã¾ãã!
READMEã«ãæ¸ãã¦ãã¾ãããCRubyçããã®ãã¼ããªã®ã§è©³ããAPIæ å ±ã¯ãã¡ãããåç §ãã ããã
ã¤ã³ã¹ãã¼ã«
ã¤ã³ã¹ãã¼ã«ã¯ãé常éãbuild_config.rbã«ä¾ågemã追è¨ãã¾ãã
git clone https://github.com/matsumoto-r/mod_mruby cd mod_mruby vim build_config.rb
sh test.sh sh build.sh make && make install
使ã£ã¦ã¿ã
ã¾ãã¯ãNorikaraãµã¼ãã®ã»ãã«ãã¢ã¯ã»ã¹æéã¨ã¡ã½ããã¨URIãåãåãç°¡åãªTargetããã³ããããselectããQueryãã¦ãããã¾ãã
次ã«ã以ä¸ã®ãããªæãã®mod_mrubyã®è¨å®ãæ¸ãã¦ãApacheãç«ã¡ä¸ãã¾ãã æ å ±ãæããå ã®Norikraãµã¼ãã®ãã¹ãåã¨ãã¼ãçªå·ãæå®ãã¦ãã¢ã¯ã»ã¹æé/ã¡ã½ãã/URIãNorikraã«æãã¦ãã¾ãã
ãã®ããã«ãã¤ãã³ããæããéã«mod_mrubyã§åãã種ã ã®æ å ±ãå©ç¨ãããã¨ãã§ããã®ã§ã æ§ã ãªå´é¢ããåæããéã«å½¹ç«ã¤ããã«æã£ã¦ãã¾ãã
ãã¨ã¯ããªãããã®æ段ã§Apacheã«ã¢ã¯ã»ã¹ãã¦ã¿ã¾ãã
curl http://localhost/
ãã®ãã¨ãNorikraã®ã³ã³ã½ã¼ã«ããã¤ãã³ãæ°ã確èª!!
ã¢ã¯ã»ã¹æ°åå¢å ãã¦ãã¾ãã!
(以ä¸ã®ã¹ã¯ãªã¼ã³ã·ã§ããã§ã¯ã50ã)
mod_mrubyã¯æ¬å½ã«å¤ãã®ãµã¼ãæ å ±ãæ軽ã«åãã¾ãã®ã§ã mruby-norikra-clientã¨çµã¿åããã¦ã工夫次第ã§èå³æ·±ãåæãã§ããããã