Sensu Casual Talks #1
Sensu Casual Talks #1ã§åã£ã¦ãã¾ãããä¼å ´ã®æä¾ããã³æå¾ ãã¦ããã ããKAIZEN platformã®glidenoteãããããã¨ããããã¾ãããä»ã®åå è ã®çæ§ããããã¨ããããã¾ãããSensuéç¨è ã¨ãã¦ããã¡ã¨ã³ã¸ãã¢ã¨ãã¦ã¨ã¦ãé¢ç½ã話ãèãäºãã§ãã¦å¤§æºè¶³ã®åå¼·ä¼ã§ãããã¾ããã è³æ 俺ã®çºè¡¨ã¯Sensuã®UIã§ãããsensu dashboard, sensu admin, uchiwa, sensu-cliããã³Hubotããæä½ããã¨ãã®éæã«ã¤ãã¦è©±ãã¦ããã
Component â¢â¯ Server â⯠Checkãå®â¾è¡ï¨ããã«ããã£ã¦ã®æºåãCheckã®çµæã®å¦ç理ãã¤ãã³ãã®ãã³ã㪠ã³ã°ãâ¾è¡ï¨ã â¢â¯ Client â⯠å®éã«Checkãâ¾è¡ï¨ãããç£è¦å¯¾è±¡ä¸ã«ã¤ã³ã¹ãã¼ã«ãããClientã¯ãã§ãã¯å®â¾è¡ï¨ ã®ãªã¯ã¨ã¹ããåå¾ããããCheckãå®â¾è¡ï¨ããããRabbitMQã«Checkã®çµæã éä¿¡ãClientåä½ã§å®æçã«ãã§ãã¯ãå®æ½ããããã«å¶å¾¡ãããã¨ãå¯è½ â¢â¯ API â⯠Sensuã®ãã¼ã¿ã«å¯¾ããRESTãã¼ã¹ã®APIãæä¾ããã®APIãã³ã¼ã«ããã¨ç» é²æ¸ã¿ã®Clientã®æ å ±ãç¾å¨ã®ã¤ãã³ããªã©ãåå¾å¯è½ â¢â¯ Dashboard â⯠Sensuã®Webãã¼ã¹ã®ããã·ã¥ãã¼ãããã ãæ©è½ã¯å°ãªã(ããã¼ã)
æè¿ã¢ããããããããã¾ãé 飲ãã°ã©ãã§ããããªã£ã¦ãã¾ããã ãã©ã温æ³å ¥ãããã sensu-serverãsensu-apiãsensu-dashboardãredisãrabbitmqã®ããã»ã¹ãå ¥ã£ã¦ãdockerã¤ã¡ã¼ã¸ä½ã£ãã®ã§ããã«ã¤ãã¦ãããã§sensuãµã¼ãã®æ§ç¯ãdocker pull, docker runã®2ã³ãã³ãã ãã§ã§ããã ä½ã£ã githubã¨docker indexã«ç½®ããã github https://github.com/hiroakis/docker-sensu-server docker index https://index.docker.io/u/hiroakis/docker-sensu-server/ dockerå ¥ãã¦ããã·ã³ããâã¿ãããªæãã§ãdocker indexããdocker pullã§æã£ã¦ãã¦docker runã§ãã¼
ã´ã¼ã«ãã³ã¦ã£ã¼ã¯ã«çªå ¥ããã¿ã¤ãã³ã°ã§è²ã å¿ãã¦ãã¾ããããªã®ã§ãããã«Sensu Serverã®ä½ãæ¹ãã¡ã¢ã£ã¦ããã ã¡ãªã¿ã«ãSensuã¯æè¿ãã¦ãªã¤ã³ã°ã«ãã«ããã®ã¢ãã¿ãªã³ã°ãã¼ã«ãã¤ã³ã¹ãã¼ã«ããç°å¢ã¯ãCentOS 6.5 (Linux version 2.6.32-431.11.2.el6.x86_64)ã ã¡ãªã¿ã«ãSensué¢é£ã®ã¤ã³ã¹ãã¼ã«ã«ã¤ãã¦ã¯ChefãPuppetã®ä½¿ç¨ããæ¨å¥¨ããã¦ãã£ã½ãã®ã§ãä»åã¯Chefã®Cookbookããããããå©ç¨ããã¦ããã ããã(ãã®ã¨ã³ããªã§ã¯chef-soloã使ã£ã¦ç°å¢æ§ç¯ãã¦ããã) Sensuã®Chef Cookbookã¯ä»¥ä¸ã®GitHubãªãã¸ããªã§å ¬éããã¦ããã https://github.com/sensu/sensu-chef sensu-chefã®åå¾ # yum install -y git gcc
ãã¼ã¿ãã¼ã¹ãè½ã¡çãã¦ããã®ã§ããã®éã«å¥ã®ãã¨ã«çæã ãã¼ã ã®ç£è¦ã·ã¹ãã ãmonã£ã¤ã¼è¶ ã¬ã¬ã·ã¼ã·ã¹ãã ãç¥ã£ã¦ãã人ããããããããªãããmonã¯perl製ã®ã·ã³ãã«ãªç£è¦ã·ã¹ãã ãå¤ããããããã®ãªãã ãã©ãmon perlãã§æ¤ç´¢ããã¨ãããããã¦: man perlãã¨googleæ§ã«ãä½ã ã£ãã½ã¬ï¼ã¨è¨ããã¦ãã¾ãããããããªå¥´(ãmon monitoring toolãã ã¨ã¡ããã¨åºã¦ãã)ããªã®ã§ã¾ããã®éã ãã俺ãè¬ãå»ã£ã¦ãããå°å ¥ããSensuã®ãã¼ã¸ã§ã³ã¯0.12.6ãGWåãããããéç¨ãã¦ãããä»ãã¨ãåé¡ãªããã¾ã éç¨æéçããã å²ã¨é·æã«ãªã£ã¡ã¾ã£ãã®ã§ãç®æ¬¡ãã°ã 0. sensuæ¦è¦ 1. ãªãsensuï¼ 2. ã¤ã³ã¹ãã¼ã« 3. ã³ã³ãã£ã°ã®é ç½® 4. ãã©ã°ã¤ã³ã«ã¤ã㦠5. API 6. ãããã° 7. ä»å¾ã®å±æ 0. sensuæ¦è¦
ããã«ã¡ã¯ã@jedipunkz ã§ãã ä»ã¾ã§ç£è¦ã·ã¹ãã ã® Sensu ãã¯ã©ã¦ããã©ãããã©ã¼ã ã® OpenStackãã³ã³ãã£ã®ã¥ ã¬ã¼ã·ã§ã³ããã¼ã¸ã¡ã³ããã¼ã«ã® Chef ãã¯ã©ã¦ãã©ã¤ãã©ãªã® Fog ç使ã£ã¦ãã¾ ããããããããçµã¿åãããã¨ãªã¬ãªã¬ãªã¼ãã¹ã±ã¼ã©ä½ããããããªããï¼ã¨æãã ã¡ããã£ã¨ä½ã£ã¦ã¿ã¾ããã ã¡ãªã¿ã«èªåã¯ã¤ã³ãã©ã¨ã³ã¸ãã¢ã§ãããéç¨ã®åºèº«ãªã®ã§ Ruby ã«é¢ãã¦ã¯åå¿è ã¬ãã«ã§ããChef ã§æ±ã£ã¦ããã®ã¨ Rails ã¢ããªãä½ã£ãçµé¨ã¯ããã¾ããããã®ç¨ 度ãFog ã¨ããã¯ã©ã¦ãã©ã¤ãã©ãªã«ã³ã³ããªãã¥ã¼ããããã¨ã¯ã¢ãªã¾ãã..ãã¡ãª ã¿ã« Fog ã®ã³ã³ããªãã¥ã¼ãå 容㯠OpenStack Neutron(å½æ Quantum) ã®ä»®æ³ã«ã¼ã¿ ã®æä½ãè¡ãå®è£ ã§ãã ãããªèªåã§ããâ¦è¨è¨1å¨éã»å®è£ 1å¨éã§ããã¼ã¸ã£ã¨ C
ãã®ã¨ãã«ãã£ãå¯è¦åé¨åã®è©±ãæ¥ãã§ä½ã£ãã®ã§ããããéãªé¨åãå¤ãã éçºå宿ã§Dockerã¨Mesosã使ã£ã¦ããæãã«ãªã½ã¼ã¹æä¾ã¨ãããã¤ãããã¤ãä½ã£ã¦ã - wtatsuru's blog ã¯ããã« å ã®ãã¤ããå é¨æ å ±ãåã£ããµã³ãã«ãç½®ãã¦ããã¾ããé©å½ã«ãµã¼ãåãªã©ä¿®æ£ããã°ä½¿ããããããã¾ããã https://github.com/tatsuru/docker-sample-app å ¨ä½ã®ä»çµã¿ã«ã¤ãã¦ã¯ããã®å³ãããããããã¨æãã¾ã Docker + Mesos + Marathon + Graphite + Fluentd + Sensuãçµã¿åããããããã¤ç®¡çãã¼ã«ã®è©± - ããããããã° ããããã㨠ç®çã¯ã¢ããªã±ã¼ã·ã§ã³ã®ç¾ç¶ã俯ç°ã§ããããã·ã¥ãã¼ããä½ããã¨ã ããããã®Dockerã³ã³ããã¯çå½ãªã®ã§ãä¸è¨ã®æ å ±ããã¾ãéç´ãã¦ããå¿ è¦ãããã
ããã«ã¡ã¯ã@jedipunkz ã§ãã èªååã®åºç¤ãå°å ¥ããããã«è²ã 調ã¹ã¦ããã®ã§ãããç£è¦ãèªååããªãã¡ãï¼ã¨ ãããã¨ã§ Sensu ã調ã¹ã¦ãã®ã§ãã Chef ã¨ã®ç¸æ§ããããªãªæãã§ãèªåçã«ã¤ ã±ã¦ããªã¨æãã¾ããã å ¬å¼ãµã¤ã http://www.sonian.com/cloud-monitoring-sensu/ ããã¥ã¡ã³ã http://docs.sensuapp.org/0.9/index.html éçºå ãäºã Chef ã® Cookbook (æ£ç¢ºã«ã¯ã©ããã¼ Cookbook éçºã®ããã® Cookbook 㧠Include ãã¦ä½¿ã) ãç¨æãã¦ããã¦ããããã¤ã³ã¹ãã¼ã«ã容æã«ãã ããã® Omnibus å½¢å¼ã®ããã±ã¼ã¸ã®æä¾ã ã£ãããOmnibus ãªã®ã§ã¤ã³ã¹ãã¼ã«ã¨å ± ã« Sensu ãæ¨å¥¨ãã Ruby ä¸å¼ãä¸ç·ã«ã¤ã³ã¹ãã¼ã«ããã¾ã
ãã¼ã¸ã§ã³ 0.9 ãããã®ã¨ãã®å ¬å¼ããã¥ã¡ã³ãã®ãã£ãã訳ï¼å人ã®ã¡ã¢ æ å ±ãå¤ãï¼ç解ãééã£ã¦ãã¨ããããããªã®ã§æ³¨æãã¦æ¬²ãããã©ãéè¦ããããããªã®ã§åºãã¦ã¿ã Overview Sensu ã¯ç£è¦ãã¼ã«ã®ä¸ã¤ãSensu ã¯ãã "monitoring router" ã¨è¨è¿°ãããããã£ã¨å¹³ããè¨ãã¨ãSensu ã¯å¤ãã®ãã¼ãã«å¯¾ã㦠"check" ã¹ã¯ãªãããå®è¡ãã1 ã¤ã¾ãã¯è¤æ°ã® Sensu ãµã¼ãã¼ã«ã¦ "handler" ã¹ã¯ãªãããå®è¡ããã ä¾ãã°ãApache ã®æ»æ´»ãã§ãã¯ãããã¨ãããããã§ãã¯ã¹ã¯ãªããã«ããæ»æ´»ã ãã§ãªãã¡ããªã¯ã¹ãåéãããããã¦ãã®ã¢ã¦ãããã㯠1 ã¤ã¾ãã¯è¤æ°ã® Handlers ã«ã«ã¼ãã£ã³ã°ããããHandlers ã¯ãã§ãã¯çµæã«ãã£ã¦ä½ãããã®ãå®ç¾©ãããã®ã ãHandlers ã¯ä»ã®ã¨ãã E ã¡ã¼ã«ãIRCãT
Sensuã¨ã¯Sensuã¯http://sensuapp.org/ã§å ¬éããã¦ãããªã¼ãã³ã½ã¼ã¹(MITã©ã¤ã»ã³ã¹)ã®ã¢ãã¿ãªã³ã°ãã¬ã¼ã ã¯ã¼ã¯ã§ãã ç¹å¾´ä»¥ä¸ã®ãããªç¹å¾´ãããã¾ãï¼å ¬å¼ãµã¤ãã®è¨è¿°ãæ´çï¼ ã·ã³ãã«ã§èéãå¹ãæ¡å¼µæ§ãããã¢ãã¿ãªã³ã°ãã¬ã¼ã ã¯ã¼ã¯ã¨ã¼ã¸ã§ã³ããã¡ãã»ã¼ã¸ãã¹ãã¤ãã³ãããã»ããµã¼ã®æ©è½ãæä¾è¦ä»¶ã«ãããã¦ä»ã®ãã¼ã«ã¨ã®çµã¿åãããå¯è½ã¯ã©ã¦ããæèãã¦éçºèªåã§ã¯ã©ã¤ã¢ã³ã(ç£è¦å¯¾è±¡ï¼ãç»é²ã³ãã¥ããã£ãæ´»çºRubyã®EventMachineã使ã£ã¦ä½ããã¦ããã³ã¼ãã¯GitHubã§ãã¹ãããããã¹ãã³ã¼ãã¯é«ãã«ãã¬ã¼ã¸ãTravisCIã§ç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ãå®æ½Nagiosã®ãã©ã°ã¤ã³ãåå©ç¨å¯è½è¨å®ã¯ãã¹ã¦JSONãã¡ã¤ã«ã§è¡ãRabbitMQã使ã£ãã¡ãã»ã¼ã¸åã®ã¢ã¼ããã¯ãã£ã¼ãªã ããã¹ã¤ã³ã¹ãã¼ã©ã¼ãæä¾å人çãªè¦è§£ã¨ãã¦ã¯ãSens
å ¨å½1å2000ä¸äººã®ç£è¦ããã¢ã®ã¿ãªãããããã«ã¡ã¯ã Sensuã¯ãé常ã«ã·ã³ãã«ãªã¢ã¼ããã¯ãã£ã¼ã§ããã¾ãã¾ãªã«ã¹ã¿ã ã¹ã¯ãªããã使ã£ã¦ãããããªç£è¦ãè¡ã£ãããã¡ããªã¯ã¹ãã¼ã¿ãåå¾ãããã¨ãã§ãã¾ããã¡ããªã¯ã¹ãã¼ã¿ã¯ããã«Graphiteãªããã«éä¿¡ãã¦ãããã°ãã©ãã©ãã°ã©ãåã§ãã¾ãããã®ãããã®è©±ãåæã«ãªã£ã¦ãã¾ãã®ã§ãSensuã£ã¦ãªã«ããï¼ãªæ¹ã¯å ã«ãSensuã使ã£ã¦èªç±åº¦ã®é«ãç£è¦ã·ã¹ãã ã®æ§ç¯ãè¡ãæ¹æ³ããã覧ãã ããã ãã§ãã¯ã¹ã¯ãªãããæ¸ãã®ã¯é常ã«ç°¡åã§ãããSensuã§ã¯Community Pluginã¨ããå½¢ã§é常ã«ããããã®ãã©ã°ã¤ã³ãæ¢ã«å ¬éããã¦ãã¾ãã®ã§ãä»æ¥ã¯ãããç´¹ä»ãã¾ãã Community Pluginã®å ¥æãªã«ãèãããgit clone https://github.com/sensu/sensu-community-plu
AWSãªã©æ§ã ãªç°å¢ã§ãµã¼ãã管çãã¦ããã¨ããã¹ã¦åä¸ã®ç£è¦ãã¼ã«ã使ãã®ããªããªãé£ãããªã£ã¦ãã¾ãããããªãã¨ããããç§ãå®æçã«ãããããªç£è¦ãã¼ã«ã試ãã¦ãã¾ãã http://nanapi.co.jp/blog/2013/09/11/monitor_nanapi_servers/ nagiosã¨ã¯ã©ã¦ãã®ç¸æ§ãæªãï¼ ç£è¦ããã«ã¯æ§ã ãªãã¼ã«ãããã¾ããããã®ä¸ã§ãç¹ã«æåãªãã¼ã«ã¯nagiosã§ããããå¤ããã使ããã¦ãããã¼ã«ã§ããã©ã°ã¤ã³ãæ°å¤ãããæ§ã ãªç£è¦ãè¡ããã¨ãã§ãã¾ãã ã¯ã©ã¤ã¢ã³ãå´ã«nrpeãã¤ã³ã¹ãã¼ã«ãããã¨ã§ãåãã¹ãã®è©³ç´°ã®ç¶æ ã¾ã§ç£è¦ãããã¨ãã§ãã¾ããããã¾ãæ´»ç¨ããã°ããªãç´°ããç£è¦ã¾ã§ã§ãã¾ãã ããããAWSã®ãããªã¯ã©ã¦ãç°å¢ã§ä½¿ãã«ã¯é常ã«ä½¿ãã¥ããã§ããã¨ããã®ããnagiosã¯ãµã¼ãå´ã«ã©ã®ãã¹ããç£è¦ããã®ãã¨ããæ å ±ãæããªã
æ¬çªç°å¢ã®Blue-Green Deploymentã®ä»çµã¿ã®ãããã¿ã¤ããä½ã£ã¦ãã - $shibayu36->blog; éçºå宿ã§Dockerã¨Mesosã使ã£ã¦ããæãã«ãªã½ã¼ã¹æä¾ã¨ãããã¤ãããã¤ãä½ã£ã¦ã - wtatsuruã®æè¡æ¹é¢ã®ããã° Docker + Mesos + Marathon + Graphite + Fluentd + Sensuãçµã¿åããããããã¤ç®¡çãã¼ã«ã®è©± - ããããããã° ãã®è¾ºã«æ¸ããã¨ãããid:wtatsuru, id:y_uuki, id:hagihala ã¨ä¸ç·ã«ãDockerãMesosãªã©ãå©ç¨ãã¦Blue-Green Deploymentã®ãããã¿ã¤ãã®ãããªãã®ãä½ã£ã¦ããããã®åã¯é常ã«ãã£ããã¨æ¸ããã ãã ã£ãã®ã§ãããå°ãä¸èº«ã«çªã£è¾¼ãã§æ¸ãã¦ã¿ããããªãé·ããªã£ãã®ã§æéãããã¨ãã«ã§ãã©ããã ãããã¤ãéç¨ã®
æ°è¦ãµã¼ãã¹ç¨ã®ç£è¦ãNagiosããsensuã«åãæ¿ãã¦2ã¶æçµã£ãã®ã§ã å°å ¥æã®èª¿æ»ã§ç¤¾å ã§å ¬éãã¦ãissueã¨ãæå ¥ãã¦2ã¶æééç¨ããè¨é²ãå ¬éãã¦ãããã¨æãã ã¨ããã以åSensuã®äºãæ¸ãã¨å ¬è¨ãã¦ããã®ã«ããã£ãããµãã£ã¦ã㦠æ¨æ¥@ma0eããã®ããã°ãè¦ã¦ä¸è¨ã®ããåããæãåºãã¦æ¥ãã§æ¸ãã⦠@ma0e We started using it. @glidenote will report the detail soon, I think. â kentaro (@kentaro) 2013, 10æ 30 @kentaro @glidenote that would be nice â Mitsutoshi Aoe/maoe (@ma0e) 2013, 10æ 30 å°å ¥ç°å¢ã¯CentOS 6.4ã§ãå©ç¨ãã¦ããsensuã®ãã¼ã¸ã§ã³ã¯0.12.1-1ã«ãª
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}