ããã«ã¡ã¯ãã¨ã³ã¸ãã¢ãªã³ã°Gã®å®ç°(@dasoran2)ã§ãã7æã«å ¥ç¤¾ãã¦AIã»æ©æ¢°å¦ç¿ãã¼ã ã«æå±ãã¦ãã¾ãã趣å³ã¯ç«è³ã§å ¥ç¤¾æ©ã ä¼ç¤¾ã§ã¯ç«è³ã¨ã³ã¸ãã¢ã¨ãã¦ã®å°ä½ã確ç«ãã¤ã¤ããã¾ãã
ä»åã¯è»¢è·æ©ã ã§ã¯ãããã®ã®ãèªåã®ãã¼ã ã§Datadogããã©ã¤ã¢ã«å°å ¥ããã®ã§ãã®è©±ãæ¸ãã¾ãã
æ¬ç¨¿ã¯ä»¥ä¸ã®ãããªå 容ãã話ããã¾ãã
- Datadogãé¸ãã çç±
- Datadogã§ã®Dockerç£è¦ã®æ¦è¦
- Datadogã§ããã£ãã¨ãã
äºã®çºç«¯
ãã¼ã å ã§ã¬ã¹ãã³ã¹ã¿ã¤ã ã«åé¡ãçºçãã¦ããã®åå ã調æ»ããæ©ä¼ãããã¾ããã
ããããã¡ããªã¯ã¹ãCloudWatchã§åéããã¦ãããã®ã®ã»ãã«ãªãããã以ä¸ãåãã«ã¯ã¤ã³ã¹ã¿ã³ã¹ãã³ã³ããã®ä¸ã«å ¥ã£ã¦åéããå¿ è¦ãããã¾ããããã®ãããè¿ éãªå¯¾å¿ãã§ãããã®ç¶æ³ãæç ´ãããã¨èãå種å°å ¥æ¤è¨ãéå§ãã¾ããã
Datadogãé¸ãã çç±
åºæ¬çã«ã¯ã¡ããªã¯ã¹ãåããã°ããã£ãããDatadog以å¤ãæ¤è¨ããã®ã§ãããæçµçã«ã¯Datadogãé¸æãã¾ããã
å°ããªçç±ã¨ãã¦ã¯
- UIã綺éº
- ããã·ã¥ãã¼ãã®ã«ã¹ã¿ãã¤ãºæ§ã®é«ã
- ã¬ã¹ãã³ã¹ã«å¯¾ããæªè©ããªãã£ã
ãªã©ããã¾ããã大ããªçç±ã¯
- Dockerã®ã¡ããªã¯ã¹åå¾ããã£ãããµãã¼ããã¦ãã
- AWSã®ãªã½ã¼ã¹ãåãã
- ããã(ç¾ç¶)ç¡æ
ãã®ç¹ã§ããã
ããã¦ç¹ã«Dockerã®ã¡ããªã¯ã¹åå¾ãããªãããã£ãã®ã§ãã®é åããä¼ããããã¨æãã¾ãã
Datadogã§Dockerã®ã¡ããªã¯ã¹ãåå¾ãã
Datadogã¯mackerelãNewRelicã¨åããå°ç¨ã®Agentããµã¼ãã¼ã§åãããã¨ã§ã¡ããªã¯ã¹ãåå¾ãã¾ãã詳ããã¯ä»¥ä¸ã®URLã確èªãã¦ãã ããã
Agentã¯
- Linuxä¸ã§åãããã±ã¼ã¸
- Dockerã¤ã¡ã¼ã¸
äºç¨®é¡ããé¸ã¶ãã¨ã«ãªãã¾ããçç±ã¯å¾è¿°ãã¾ãããDockerã®ç£è¦ãããå ´åã¯Dockerçã®Agentã使ããã¨ãå¼·ãæ¨å¥¨ãã¾ãã
Agentãåããå§ããã¨ãAgentãDatadogã«ãã¼ã¿ãéä¿¡ãDatadogå´ããµã¼ãã¼ãèªèããä»çµã¿ã«ãªã£ã¦ãã¾ãã
ã·ã¹ãã ã®ã¡ããªã¯ã¹ã®ã»ãã«ãã¡ããã§ããããã«ã¦ã§ã¢ã®ã¡ããªã¯ã¹ãåããã¨ãã§ãã¾ããããã«ã¦ã§ã¢ã®ã¡ããªã¯ã¹ãåãã«ã¯åºæ¬çã«ã¯*2è¨å®ã追å ããã ãã§å¤§ä¸å¤«ã§ããã©ããã£ãããã«ã¦ã§ã¢ã®ã¡ããªã¯ã¹ãåããã®ãã¯ä»¥ä¸ã確èªãã¦ããã ããã°ãããã¾ãããããªãåºç¯å²ãã«ãã¼ãã¦ãã¾ãã
Dockerèªä½ã®ã¡ããªã¯ã¹ãåå¾ãã
Datadogã§Dockerã®ã¡ããªã¯ã¹ãåå¾ããã«ã¯Docker integrationã使ç¨ãã¾ãã
Dockerèªä½ã®ã¡ããªã¯ã¹ãåå¾ããã«ã¯åè¿°ã®éãè¨å®ã追å ã¨æå¹ã«ãªãã¾ãããã ããDockerçã®Agentã使ã£ãå ´åã¯ããã©ã«ãã§æå¹ã«ãªã£ã¦ãã¾ãã
ãã®integrationãå°å ¥ããã¨
- ã³ã³ããã®CPU使ç¨ç
- ã³ã³ããã®ã¡ã¢ãªä½¿ç¨ç
- åãã¦ããã³ã³ããã®ç·æ°
ãªã©ãåãã¾ãã
ã¾ã以ä¸ã®ãããªãã£ãããããã·ã¥ãã¼ãã§ä¸è¦§ã確èªã§ããããã«ãªãã¾ãã
Dockerã®ä¸ã®ããã«ã¦ã§ã¢ã®ã¡ããªã¯ã¹ãåå¾ãã
Dockerèªä½ã®ã¡ããªã¯ã¹ã¯ã¨ããããä»ãã¢ããªã±ã¼ã·ã§ã³èªä½ãDockerã®ä¸ã§åãã¦ããã®ã§Dockerã®ä¸ã®JVMãããã«ã¦ã§ã¢ã®ã¡ããªã¯ã¹ãåå¾ããããªãã¾ãã
ãããDatadogã§ä¸çªããã£ãã¨ããã§ãDatadogã¯ãã³ãã¬ã¼ãçãªè¨å®ãç¨æããã¨åãã¦ããã³ã³ããã®IPçãèªåã§è§£æ±ºãã¦ã¡ããªã¯ã¹ãåå¾ãã¦ãããä»çµã¿ãããã¾ãããããAutoDiscoveryã§ãï¼
ãã®ãã³ãã¬ã¼ãã¯å ¨ã¦ã®è¨å®ã§ä½¿ããã®ã§ãããä¾ãã°
init_config: instances: - nginx_status_url: http://localhost/nginx_status/
ã¨ãã£ãnginxã®è¨å®ãããã¾ããDockerã³ã³ããã®IPã 172.16.0.5 *4 ã ã¨ããã¨ã
init_config: instances: - nginx_status_url: http://172.16.0.5/nginx_status/
ã¨ããã°ãã¹ãããã¡ããªã¯ã¹ãåå¾ã§ãã¾ããããããå½ç¶ã§ããnginxã®ã³ã³ãããä½å°åããã¯äºåã«ã¯ææ¡ã§ããªã(ãããããªè¨è¨ã«ããããªã)ã®ã§ãç¾å®çã§ã¯ãªããªãã¾ãã
ããã§AutoDiscoveryã使ãã¨
ad_identifiers: - httpd init_config: instances: - nginx_status_url: http://%%host%%/nginx_status/
ã¨ããã°ãä¸ã§åãã¦ããã³ã³ããã®IPãåæã«è§£æ±ºãã¦ã¡ããªã¯ã¹ãåå¾ãã¦ãããããã«ãªãã¾ãã ããã§ãad_identifiersã¯Dockerã®short image nameãæå®ãã¦ãã¾ãã*5
ããã§ãä»®æ³ãã·ã³ä¸ã§åãã¦ããããã»ã¹ã¨åãããã«Dockerä¸ã®ããã»ã¹ã®ã¡ããªã¯ã¹ãåããããã«ãªãã¾ããã
ã¯ã¾ã£ãã¨ãã
ã¨ãç´ æµãªDockerç£è¦çæ´»ãéå§ã§ããããã§ãããçµæ§ããããã¤ã³ããããã¾ãã
1.AutoDiscoveryããããªã
ã¯ãããã¹ãã§ç´ã§åãAgentã使ç¨ãã¦Docker integrationã¾ã§ã»ããã¢ããããã®ã§ããããã®å¾AutoDiscoveryãã³ã³ãããè¦ã¤ãã¦ãããè¦å´ãã¾ããã
ããããåè¿°ã®AutoDiscoveryã®ãã¼ã¸ãè¦ã¦ã¿ãã¨ã
How to set it up
The Datadog Docker Agent automatically auto-discovers other containers.
ã¨ãDockerçAgentã®è©±ãããªããã©ãã«ãæè¨ã¯ãªããã®ã®Dockerçã®Agentã§ãªãã¨ç£è¦ãã¦ãããªãã®ã§ã¯ã¨æ°ã¥ãã¾ããã
çå½ã¯ä¸æã§ãããåãè¨å®ãDockerçAgentã«é£ãããã¨ããåãããããããããããªã®ã ã¨æãã¾ãã
ã¡ãªã¿ã«ããã¨logãåãã¦ãããã®ã§ãagent.log*6ãè¦ãã¨è§£æ±ºãããã¨ãå¤ãã§ããä»AutoDiscoveryã ã¨
$ agent configcheck -v
ãã®ã³ãã³ãã§ç¾å¨ã®è¨å®é©ç¨ç¶æ³ã確èªã§ããã®ã§ãã¡ããæ´»ç¨ãã¾ããã
2.JVMã®ç£è¦ãããå ´åã¤ã¡ã¼ã¸ãéã
JVMã®ç£è¦ãè¡ãå ´åãJMXã使ã£ã¦ç£è¦ãã¾ãã
ããã®èª¬æãèªãåã«æè¨ããã¦ããªãã¨æãã®ã§ãããå®ã¯DockerçAgentã«ã¯é常çã¨JVMãå«ãã çãããã¾ãã
ãããè¦ãã¨
- latest
- latest-jmx
ãã®2ã¤ããããlatest-jmxã§ãªãã¨integrationãåãã¾ãã
3.Datadogã®5ç³»ã®Agentã¨6ç³»ã®Agentã®ããã¥ã¡ã³ãããã¡ããã¡ã
ããèªãã§ããªãã®ãæªãã®ã§ããã主è¦ãã¼ã¸ã§ã³ã¨ãã¦5ç³»ã¨6ç³»ããããããããã¥ã¡ã³ãã両æ¹ããã¾ãã ä¸ä¾¿ã ã¨æã£ãã®ã¯ããã¼ã¸ã§ã³ãã¨ã«ããã¥ã¡ã³ããç¬ç«ãã¦ããã®ã§ã¯ãªãåããã¼ã ã¹ãã¼ã¹ã«ä¸¡æ¹ã®ãã¼ã¸ã§ã³ã®ããã¥ã¡ã³ããæ··å¨ãã¦ãããã¨ã§ãã
ããã¯æ°ãã¤ãã¾ããããããã§ãããå ±æã®ããã«æ¸ãã¦ããã¾ãã
Datadogãå°å ¥ããçµæ
Datadogãå°å ¥ããçµæã
- æ®éã®ã¡ããªã¯ã¹ãåããããã«ãªã£ã
- ããã·ã¥ãã¼ãã§ç£è¦ã§ããããã«ãªã£ã
- Dockerã³ã³ããä¸ã®ããã»ã¹ãããæãã«åå¾ã§ããããã«ãªã£ã
ã¨ããããã§ããã£ã¦ãã¾ãã°å½ããåã®ç°å¢ãæã«å ¥ãã¾ããã
ãããã£ããµã¼ãã¹ã®ä¸ã§Datadogã§ããã£ããã¨ããã¨ãã¯ãDockerå ã®ããã»ã¹ç£è¦ããæ軽ã ã£ãç¹ã§ãã
ã¾ããDashboardãé常ã«è¦ãããæºè¶³åº¦ã¯çµæ§é«ãã£ãã§ãã
å°å³ã«å¬ããã£ãç¹ã¨ãã¦ãç´°ãã欲ããæ©è½ãåå¨ãããã¨ãããã¾ãã
- SAMLèªè¨¼ã¨ã
- slackéç¥ã¨ã
- LBã¨ãã®ãããã¯ã¼ã¯ç³»ã¨ã
åå¥åå¥ã¯ä»ã®ãµã¼ãã¹ã«ãããã¾ããããã®å¯¾å¿ã®åºãã¯é åã§ããã
ã¾ã¨ã
ã¾ã¨ãã¨ãã¦ã¯
Datadogã®Dockerç£è¦ããã£ããï¼
ããã«å°½ãã¾ãã
ä»åå°å ¥ã«ãã¾ãæéã使ããããªãã£ãã®ã§ãã«ããã¼ã¸ãã§ç£è¦ããã«ã¯ããªããããªé¸æè¢ã ã¨æãã¾ããã
We're Hiring!
ãã®ä¼ç¤¾ã«å ¥ç¤¾ãã¦ã¾ã ä¸æã¨å°ãã§ãããæ©éãããã£ããããããï¼ããæ¥åã§åãçµã¾ãã¦ããã ãã¾ãããä»ã«ãæ§ã ãªä»äºã«ãã£ã¬ã³ã¸ã§ããç°å¢ã§ãã
éã«ãããããã¨ã沢山ããããã¦æãåãã¾ããï¼ä¸ç·ã«åãçµãã§ãããæ¹ããå¾ ã¡ãã¦ãã¾ãï¼
*1:ã¢ã¤ã³ã³ããããã
*2:Dockerçã®Agentã§ã¯ãjmxãåãããã«ã¯JVMã®å ¥ã£ãDockerã¤ã¡ã¼ã¸ã使ç¨ããå¿ è¦ãããã¾ããã¯ã¾ã£ãã¨ããåç §
*3:ãã¡ãã¯ããã«ã¦ã§ã¢ä»¥å¤ã®ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãå«ãã§ãã¾ããslackã¨ãã
*4:ç¹ã«æ°åã«æå³ã¯ãªã
*5:å ¬å¼ããã¥ã¡ã³ãã«ããã¾ãããããã¯image nameã«éãã¾ããã
*6:5ç³»ã ã¨collector.logã ã£ãæ°ããã