nginx
tl;dr ngx_mruby ã¨ã¯ ãªãã¤ã¬ã¯ãæ¡ä»¶ å®ã¯ã·ã³ãã« ãã¦, ã©ããããã Nginx ã®è¨å® mruby ã³ã¼ã ã¡ãã£ã¨åããã¦ã¿ã æå¾ã« tl;dr ã¨ãããµã¼ãã¹ã®ç§»è¡ä½æ¥ã§ 200 åãããã®ãªãã¤ã¬ã¯ãå¦çã ngx_mruby ã§å®è£ ããã®ã§ã¡ã¢ãã¦ããã¾ã. ngx_mruâ¦
ããããã㨠åå, Nginx ã§ç¹å®ã®ãã¹ã«ããã¦åºå®ã®ã¬ã¹ãã³ã¹ (ã¹ãã¼ã¿ã¹ã³ã¼ã, ããã£) ãè¿ãçºã®è¨å®ã«ã¤ãã¦ã¡ã¢ã£ããã©, ä»åã¯, ãããæ¤è¨¼ããã«ããã£ã¦ Go ã® testing ããã±ã¼ã¸ã§ãã¹ãã³ã¼ããæ¸ãã¦æ¤è¨¼ããã話ãå°ã. inokara.hatebloâ¦
ããããã㨠諸注æ ãã£ãã㨠åè ããããã㨠Nginx ã§ç¹å®ã®ãã¹ã«ããã¦åºå®ã®ã¬ã¹ãã³ã¹ (ã¹ãã¼ã¿ã¹ã³ã¼ã, ããã£) ãè¿ã. 諸注æ åä½ç¢ºèªç°å¢ã¯ä»¥ä¸ã®éã. $ nginx -V nginx version: nginx/1.15.10 built by gcc 6.3.0 20170516 (Debian 6.3â¦
ããããã㨠解ã®ä¸ã¤ åè é¤å¤ãã UserAgent ãè¨å® Web ãµã¼ãã¼ã®è¨å®ï¼ã¢ã¯ã»ã¹ãã°ã®è¨å®ï¼ ä»¥ä¸ ããããã㨠ELB ããã®ãã«ã¹ãã§ãã¯ãã°ã¯ãã°ã«è¨é²ããããªãã 解ã®ä¸ã¤ åè bjornjohansen.no é¤å¤ãã UserAgent ãè¨å® /etc/nginx/conf.dâ¦
tl;dr ãã£ãã㨠æ§æã¤ã¡ã¼ã¸ ãããã·ç¨ EC2 ã®ä½æ Amazon ES ã®ä½æ EC2 ã¸ã® Nginx ã¤ã³ã¹ãã¼ã«ã¨è¨å® CloudWatch Logs Agent ã®ã»ããã¢ãã Kibana ã¸ã®ã¢ã¯ã»ã¹ ã¢ã¯ã»ã¹ãã° ä»¥ä¸ ææ³ ã¡ãª åºç® 解決åºæ¥ã¦ããªãèª²é¡ tl;dr Amazon ES ã® Kibanaâ¦
è¿½è¨ tl;dr memo 試ããç°å¢ çµè« é㪠Nginx è¨å® curl ã§è©¦ã ãã©ã¦ã¶ã§è¦ã ã¢ã¯ã»ã¹ãã°è¦ã¦ã¿ã ã¨ãããã¨ã§ ã¢ã³ã«ã¼ãªã³ã¯ã¯... ãªãã§ï¼ è¿½è¨ ä»¥ä¸ãååã®ãã£ããã«æãã¦é ããã®ã§è¿½è¨ã #foo ã®äºããã©ã°ã¡ã³ãèå¥åï¼URL ãã©ã°ã¡ã³ã / Fâ¦
ã¯ããã« nginx ã使ã£ã¦ããå ´åã«ãµã¼ãã¹ã®ã¡ã³ããã³ã¹çã«å½¹ç«ã¡ãããªå°ãã¿ ä»ã«ããã¿ãããã°éææ¸ã å°ãã¿ #1 è¨å®ã« if ãå©ç¨åºæ¥ã è¨å®ã« if ã使ãã è¯ãç¥ããããã¨ãªã®ãããããªãããnginx ã®è¨å®ã«ã¯ if ã使ããã®ã§æ·±å¤ã¡ã³ããã³â¦
ã¯ããã« ããããå¼ããã£ã¦ããã¾ãã Dockerfile å ã§ã®ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¹ã«ã¤ã㦠monit ãå©ç¨ããæ¹æ³ãæãã¤ããã®ã§è©¦ãã¦ã¿ãã®ã§ã¾ã¨ãã¦ã¿ã åè monit ã©ãããã®ãï¼ ä½ã¯ã¨ããã monit ãã¤ã³ã¹ãã¼ã«ããã sudo apt-get install mâ¦