ã¯ã¦ãªã®Webãªãã¬ã¼ã·ã§ã³ã¨ã³ã¸ãã¢ã® @y_uuki1 ã§ãã
ãã®è¨äºã¯ Mackerel Advent Calendar 2015 ã®19æ¥ç®ã®è¨äºã§ãã
åå㯠@mackee_w ããã«ãã 1000å以ä¸ã§è²·ããWiFiã¢ã¸ã¥ã¼ã«ESP-WROOM-02ã§Mackerelã«ã¡ããªã¯ã¹ãéã ã§ããã
ä»åã¯ãã¯ã¦ãªã®ã¤ã³ãã©ãã¼ã ï¼ã·ã¹ãã ãã©ãããã©ã¼ã é¨ï¼ã«ãããMackerelã絡ããéç¨ããã¼ã®ä¸é¨ãç´¹ä»ãã¾ãã
ã¯ã¦ãªã§ã¯ãã¯ã¦ãªã®ãµã¼ãã¹ã®åºç¤ã¨ãªããµã¼ãã»ãããã¯ã¼ã¯éç¨å ¨è¬ãå°éã®ã¤ã³ãã©ãã¼ã ãæ å½ãã¦ãã¾ãã ã¯ã¦ãªããã¯ãã¼ã¯ãã¯ã¦ãªããã°ãMackerelãªã©ã®ã¯ã¦ãªã®å種ãµã¼ãã¹ã«å¯¾ãã¦ãã¤ã³ãã©ãã¼ã ã®åã¡ã³ãã¼ãæ å½ã«ã¤ãã¾ãã ä¸é¨ä¾å¤ã¯ããã¾ãããã¤ã³ãã©åºç¤ã¯åºæ¬çã«åãµã¼ãã¹ã§å ±éã®ãã®ã使ã£ã¦ãã¾ãã ã¯ã¦ãªã¯éç¨ãµã¼ãã¹ã®æ°ãå¤ããã¤åãµã¼ãã¹ãäºãã«é£æºãããã¨ãããã®ã§ãåºç¤ãå ±éåãã¦ãéç¨å¹çãããã¦ãã¾ãã ä¾ãã°ããã¼ããã©ã³ãµï¼ä¸»ã«LVSï¼ã¯åä¸ãµã¼ãã¹ã§ã¯ããã©ã¼ãã³ã¹ã使ãåããªããã¨ãããã®ã§ãè¤æ°ãµã¼ãã¹ã§åããã¼ããã©ã³ãµã使ã£ã¦ãã¾ãã ä»ã«ã¯AWSã®ã¢ã«ã¦ã³ããMackerelã®ãªã¼ã¬ãã¼ã¼ã·ã§ã³ãªã©ãã¯ã©ã¦ãåºç¤ãç£è¦åºç¤ãå ±éã§ãã
ããã©ã¼ãã³ã¹ç¶æ³å ±æä¼
以ä¸ã®ããã«ã·ã¹ãã ã®éç¨ãã¤ã³ãã©ãã¼ã ã«éç´ããã¦ãã¾ããã¢ã©ã¼ãã®ä¸æ¬¡å¯¾å¿ãã¤ã³ãã©ãã¼ã ãè¡ãã¾ãã ä¸æ¹ã§ããã®ããã«éç¨ãã¤ã³ãã©ãã¼ã ã«éç´ããã¦ããã¨ãæ å ±ã®å ±æãã¤ã³ãã©ãã¼ã å ã«éããã¡ã§ãéçºãã¼ã ã®ã¨ã³ã¸ãã¢ãç¶æ³ãææ¡ã§ãã¦ããªãããããã¯ãã®éãåé¡ã«ãªããã¨ãããã¾ãã ããã§ãå®æçã«PWGï¼Performance Working Groupï¼ã¨å¼ã°ããä¼ãéããéçºãã¼ã ã®ã¨ã³ã¸ãã¢ã¨ã¤ã³ãã©æ å½ãæè¿ã®ããã©ã¼ãã³ã¹ç¶æ³ããµã¼ãæ§æã®å¤æ´ãå ±æãã¾ãã
ãã®PWGã§ã¯ãMackerelãKibanaã®ããã·ã¥ãã¼ããç¨ãã¦ã¿ããªã§ã°ã©ããçºãã¦ãæè¿ã®ããã©ã¼ãã³ã¹å¤åãå ±æãã¾ãã ãã®ã¨ããPWGç¨ã«ã«ã¹ã¿ã ããã·ã¥ãã¼ããä½æãã¦ãããããã ãã¿ãã°ããã¨ããå½¢ã«ãã¦ãã¾ãã ãµã¼ãã¹ãæ§æãããã¹ãã®ãã¹ã¦ã®ã¡ããªãã¯ã°ã©ããã¿ããã¨ã¯ãã¾ãç¾å®çã§ã¯ãªããããã·ã¹ãã ã®ããã©ã¼ãã³ã¹ã«ã¨ã£ã¦ç¹å¾´çãªã¡ããªãã¯ãé¸ã¶ãã¨ãéè¦ã§ãã æé©ãªããã·ã¥ãã¼ãã¯ç¶æ³ã«ãã£ã¦ç°ãªããããåé¡ãèµ·ããããæ°ã«ãªã£ãã¡ããªãã¯ãå¢ããããå帰çã«ã°ã©ãã追å ãã¦è²ã¦ã¦ããã¾ãã
æä¼ã¨é¨ä¼
ã¤ã³ãã©ãã¼ã ã§ã¯æ¯æ¥ã®æä¼ã§ãåæ¥ããã®ã¢ã©ã¼ããæ¯ãè¿ãã¾ãã Slackã®ãã£ã³ãã«ã«æµãã¦ããMackerelããã®ã¢ã©ã¼ãéç¥ãã¿ã¦ããã¼ã å ¨å¡ã§å ¨ãµã¼ãã¹ã®ç¶æ³ã確èªãã¾ããæ¢ã«å¯¾å¿æ¸ã¿ã§ããã°ãã©ã®ãããªå¯¾å¿ããããå ±æããæªå¯¾å¿ã§ããã¾ãã¯è¿½å ã®å¯¾å¿ã®å¿ è¦ãããã°ã¿ã¹ã¯ã¨ãã¦ç»é²ããã¾ãã
ããã«ãã¤ã³ãã©ãã¼ã ã§ã¯å®æçã«é¨ä¼ããããåã¡ã³ãã¼ã®ã¿ã¹ã¯ç¶æ³ãé¨å ããã¸ã§ã¯ãã®é²æãæè¿ã®ã¢ã©ã¼ãç¶æ³ãªã©ãå ±æãã¾ãã ãã®ä¸ã§ãMackerelä¸ã®ãã¹ãã®ã¹ãã¼ã¿ã¹ãmaintenanceã®ã¾ã¾ãæ¾ç½®ããã¦ãã¾ã£ã¦ãããã®ããã§ãã¯ãã¾ãã maintenanceã®ã¾ã¾ã ã¨ã¢ã©ã¼ããçºçããªããããã¡ã³ããã³ã¹ãçµãã£ã¦ããã°ã¹ãã¼ã¿ã¹ãæ»ãå¿ è¦ãããã¾ãã Mackerelã«ã¯maintenanceç¶æ ã®ãã¹ãä¸è¦§ã表示ãããã¥ã¼ã¯ã¾ã ããã¾ããã代ããã«ãä¸è¨ã®ããã« mkr ã使ã£ã¦ãã³ãã³ãã©ã¤ã³ã§maintenanceç¶æ ã®ãã¹ãä¸è¦§ãåºåã§ãã¾ãã
mkr hosts --st maintenance | jq -rM ".[].name"
ãã®è¨äºãæ¸ããªããèãã¾ããããhubotã§ãmaintenanceã®ãã¹ããæ¯æãããã¯æ¯é±å ±åãã¦ãããããããã¾ããã
ãªãªã¼ã¹æé æ¸
ã¯ã¦ãªããã°ãã¼ã ã®éçºããã¼ã¨GitHub - Speaker Deck ã®è³æã§ç´¹ä»ããã¦ããããã«ãã¯ã¦ãªã®éçºãã¼ã ã§ã¯ github-pr-release ãç¨ãã¦ããªãªã¼ã¹æé æ¸ã®ä½æãèªååããä½æãããæé æ¸ã«ãããã£ã¦ãªãªã¼ã¹ãå®æ½ããã¾ãã çè ãã¤ã³ãã©æ å½ããã¦ããMackerelãã¼ã ã§ã¯ããã®æé æ¸ã®ä¸ã§ãMackerelã®ãµã¼ãã¹ã¡ããªãã¯ã°ã©ããKibanaã®ã°ã©ãã®ãªã³ã¯ãæ¸ãã¦ããããªãªã¼ã¹æ å½è ãã°ã©ãã«å¤åããã§ãã¯ããé ç®ãããã¦ããã£ã¦ãã¾ãã ããã¯ãã¢ã©ã¼ãéç¥ããã¯ããåé¡ã«æ°ã¥ããã¨ããç¹ã¨éçºãã¼ã ã®ããã©ã¼ãã³ã¹æèã®åä¸ã¨ããå¹æãããã¨èãã¦ãã¾ãã
ã¢ã©ã¼ãã®Slackéç¥
ããã¾ã§ã§æ¢ã«ä½åº¦ãç»å ´ãã¦ããã¢ã©ã¼ãã®Slackéç¥ã«ã¤ãã¦ã§ããã¢ã©ã¼ãã¨ãã£ãããã¼ã«ã®é£æºã¯åºæ¬ã§ããããã¯ãé常ã«ä¾¿å©ã ã¨æãã¾ãã ã¯ã¦ãªã§ã¯å ¨ç¤¾çã«Slackãå©ç¨ãã¦ãããåãµã¼ãã¹ãã¨ã®æ¥åãã£ã³ãã«ãããã¾ãã ç¹ã«ãä¸é¨ã®éçºãã¼ã ã§ã¯ããã£ã¬ã¯ã¿ã¼ããã¶ã¤ãã¼ããã©ã³ãã¼ããµãã¼ããç·¨éãªã©ãå«ãã¨ã³ã¸ãã¢ä»¥å¤ã®ã¡ã³ãã¼ã常é§ãããã£ã³ãã«ã«ãã¢ã©ã¼ããæµããã·ã¹ãã ã®ç¶æ³ãé¢ä¿è å ¨å¡ãã¿ããããã«ãªã£ã¦ãã¾ãã Mackerelã®Slackã¸ã®ã¢ã©ã¼ãéç¥ã¯ã°ã©ãç»åã表示ããããããåãªãæ©æ¢°çãªã¢ã©ã¼ãã¡ãã»ã¼ã¸ããã馴æã¿ãããè¦è¦çã«ããããããã¨ããå´é¢ãããã¨æãã¾ãã
Slackã«ã¢ã©ã¼ããéç¥ãã - Mackerel ãã«ã
ãã¨ãã
æ¥ã ã®ä»äºã®ä¸ã«ãããããMackerelã®æ´»ç¨äºä¾ã«ã¤ãã¦ç°¡åã«ç´¹ä»ãã¾ããã å¾æ¥ã®ç£è¦ã·ã¹ãã ã¯ãå®å ¨ã«ã¨ã³ã¸ãã¢ã ãã触ããã®ã¨ããèªèã§ããããMackerelãå©ç¨ãã¦ãããªãã§ããããã¤ã¦ã¼ã¶ã®åºãããæãã¦ãã¾ãã ã¤ã³ãã©å°éã®ã¨ã³ã¸ãã¢ã使ãã ãã«ã¨ã©ã¾ãããã¤ã³ãã©éç¨ã¨ãµã¼ãã¹éçºã®è·é¢ã縮ãã¦ãããã°ãããªã¨èãã¦ãã¾ãã
ã¯ã¦ãªã§ã¯ãMackerelã®éçºãéç¨ã«èå³ãããã¨ã³ã¸ãã¢ãåéãã¦ãã¾ãã
SRE (Site Reliability Engineer) è· - æ ªå¼ä¼ç¤¾ã¯ã¦ãª Webã¢ããªã±ã¼ã·ã§ã³ã¨ã³ã¸ãã¢è· - æ ªå¼ä¼ç¤¾ã¯ã¦ãª
ææ¥ã®æ å½ã¯Mackereléçºãã¼ã ã® @stanaka ã§ããã楽ãã¿ã«ã