Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
consul-atlas-alerts
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
rrreeeyyy
August 05, 2015
Technology
8.8k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
consul-atlas-alerts
#hashi_wantedly
rrreeeyyy
August 05, 2015
More Decks by rrreeeyyy
See All by rrreeeyyy
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
6
1.2k
Reliability in the Age of AI: Engineering for AI Velocity
rrreeeyyy
0
210
Rethinking Incident Response: Context-Aware AI in Practice - Incident Buddy Edition -
rrreeeyyy
0
280
Rethinking Incident Response: Context-Aware AI in Practice
rrreeeyyy
3
2.6k
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
340
An Efficient Incident Response Training with AI / SRE NEXT 2024 Sponsor Session
rrreeeyyy
1
6.3k
カンファレンスから見る SRE トレンド 2024 / SRE Trends from Conferences in 2024 #SRE_Findy
rrreeeyyy
4
2.7k
信頼性の育て方 / mackerel-meetup-15
rrreeeyyy
10
3k
SRE の歩き方・進め方 / sre-walk-through-procedure
rrreeeyyy
0
9k
Other Decks in Technology
See All in Technology
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
260
あるけみー式LTスライド作成術
alchemy1115
1
180
Adaptive Warehouse を今すぐ導入すべき理由と迷ったときの判断基準
__allllllllez__
0
180
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
330
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
580
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
150
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
4
980
GoCon2026 - Open Source, Open World
sanposhiho
4
3.2k
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
160
20260912_スクフェス三河
kgnkhkr
0
290
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
190
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
320
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Automating Front-end Workflow
addyosmani
1369
210k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
510
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
The Limits of Empathy - UXLibs8
cassininazir
1
650
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
WENDY [Excerpt]
tessaabrams
13
39k
How to Talk to Developers About Accessibility
jct
2
540
Designing Powerful Visuals for Engaging Learning
tmiket
1
540
Transcript
Consul'in'Atlas !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 1
!Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)!
2
Hashicorp*ͱΘͨ͠(ͱձࣾ) • h#ps:/ /speakerdeck.com/rrreeeyyy/hashicorp3tools3overview • Vagrant;→;(΄΅ΈΜͳͬͯΔ) • Packer;→;(ͬͯͳ͍) • Serf;→;(ͬͯͳ͍)
• Consul;→;(ͬͯΔҊ͕݅;1;ͭ͋Δ/͕ࣗ৮ͬͯΔ/ଞʹ৮ͬͯΔਓ͕͍Δ) • Terraform;→;(͍͍ͨ/ݕূͯ͠ΔਓࣗҎ֎ʹډΔ) • Vault;→;(Θ͕ͨ͠৮ͬͯΔ) !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 3
લճ·Ͱͷ͋Β͢͡!(1)!1 • consul(ͱ(consul)alerts(2(ͰΞϥʔτൃใ͢ΔγεςϜ 2"h$ps:/ /github.com/AcalephStorage/consul9alerts 1"h$p:/ /www.slideshare.net/rrreeeyyy117/consul8andalertsmonitoring !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 4
લճ·Ͱͷ͋Β͢͡!1 • consul(ͷ(health-check(3(͕ࣦഊͨ͠Β(Pagerduty/Slack/Hipchat/ email...(ʹΞϥʔτൃใ • consul-alert(Λ࣮ͬͯݱ • Nagios/Sensu(ͷεΫϦϓτΛྲྀ༻ͯ͠ઃఆՄೳ • HTTP(API(͔Βࢹ/αʔϏεొ͕ग़དྷͯศར
3"h$p:/ /www.consul.io/docs/agent/checks.html 1"h$p:/ /www.slideshare.net/rrreeeyyy117/consul8andalertsmonitoring !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 5
Atlas • ࠷ۙ(7$݄಄ࠒ)Ұൠ͚ϦϦʔε͞Εͨ$4 • Hashicorp$֤πʔϧͱͷ࿈ܞ͢ΔϓϥοτϑΥʔϜ • ͪΖΜ$Consul$࿈ܞ͋Δ • લड़ͷΞϥʔτγεςϜ$Atlas$Λ͑ग़དྷΔ •
Consul$+$Atlas$͚ͩͰՄೳ 4"h$ps:/ /hashicorp.com/blog/atlas4general4availability.html !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 6
Atlas&+&Consul • /etc/consul.conf { "server": true, "node_name": "NODE-NAME", "datacenter": "DC-NAME",
"data_dir": "/usr/local/consul/data", "bind_addr": "192.168.2.1", "bootstrap_expect": 3, "addresses": { "http": "192.168.2.1" }, "log_level": "INFO", "atlas_token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "atlas_join": true, "atlas_infrastructure": "topotal/groupname" } !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 7
Atlas&+&Consul • consul.service : [Service] User=consul Group=consul ExecStart=/usr/local/bin/consul agent -config-file
/etc/consul.conf ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure RestartSec=10s : !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 8
Atlas&+&Consul • ͜Μͳײ͡ʹͳΔ !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 9
Service/Check+ొํ๏ • ىಈ࣌ʹ"json"Λͯ͠ొ • HTTP"API"ܦ༝Ͱొ • (Terraform"ӽ͠ʹొ) !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 10
ىಈ࣌ʹ!json!Λͯ͠ొ • ࣍ͷΑ͏ͳ"json"Λىಈ࣌ʹͯ͋͛͠Δ • -config-file"͘͠"-config-dir { "service": { "id": "linux-server",
"name": "linux-server", "tags": ["linux-server"] } } { "check": { "id": "check_load", "name": "Load Average", "script": "/usr/lib64/nagios/plugins/check_load -w 15,12,12 -c 30,25,20", "interval": "30s", "service_id": "linux-server" } } !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 11
ىಈ࣌ʹ!json!Λͯ͠ొ • config-dir"σΟϨΫτϦΛ࠶ؼతʹಡ·ͳ͍ • -config-dir /etc/consul.d/"Λࢦఆͨ͠߹ • -config-dir /etc/consul.d/*.json"ΛΞϧϑΝϕοτॱͰಡΉ •
/etc/consul.d/role/*.json"ಡ·ͳ͍ • ಉ͡σΟϨΫτϦʹ"Service/Check"༻ͷ"json"Λஔ͔ͳ͍ํ͕ྑ͍ • ઌʹ"Service"༻ͷ"json"͕ಡ·Εͳ͍ͱىಈ࣌ʹࢮ͵ !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 12
HTTP$API$ӽ͠Ͱొ • ࣍ͷΑ͏ʹͯ͛͠Δ • json"ͷॻ͕ࣜىಈ࣌ʹ͢ͷͱҧ͏ͷͰҙ͢Δ [root@localhost ~]# cat load.json {
"id": "check_load", "name": "Load Average", "script": "/usr/lib64/nagios/plugins/check_load -w 15,12,12 -c 30,25,20", "interval": "30s", "service_id": "linux-server" } [root@localhost ~]# curl -vvv -X PUT -d \ > @disk_root.json http://192.168.2.1:8500/v1/agent/check/register !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 13
HTTP$API$ӽ͠Ͱొ • ಉ͡"id"Λ࣋ͬͨ"json"Λ"v1/agent/check/register"ʹ͛ΔͱҰॠΞ ϥʔτʹͳΔ • ᮢม͑ͨΓ͢Δͱ͖ʹগ͠໘ष͍ • ࣍ͷ"HTTP"API"Λۦ͢Δ͜ͱͰճආՄೳ • /v1/agent/service/maintenance/
• /v1/agent/check/pass • /v1/agent/check/deregister/<checkId> !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 14
Terraform(ӽ͠ʹొ • consul(integra/on(͋Δ͠ͳΜͱ͔ͳΒͳ͍Ͱ͔͢Ͷʁ • ৄ͍͠ํ͋ͱͰڭ͍͑ͯͩ͘͞... • ͘͠(PR(ΛૹΔ • 0.8(͙Β͍͔Β(5state(͕ཁΒͳ͘ͳΔͱ͍͏༧(5 5"h$p:/
/www.infoq.com/news/2015/06/hashimoto9consul9terraform !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 15
Ξϥʔτͷ༷ࢠ !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 16
Status&output&ͷ༷ࢠ !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 17
Alert&history&ͷ༷ࢠ !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 18
·ͱΊ • ࠓճ"Consul"+"Atlas"ͰΞϥʔτγεςϜΛ࡞ͬͨ • consul-alerts"ͷ͜ͱΛߟ͑ͳͯ͘ྑ͘ͳΔͷͰָ • Ϋϥελͷॳظߏஙָ͕ʹͳΔ • Atlas""10"͙Β͍·Ͱແྉʂ •
ݸਓنͰ"Nagios/Zabbix"ཱͯͨ͘ͳ͍ͬͯਓʹΦεεϝ • ֎ܗࢹΈ͍ͨͳͷผ్ߟ͑Δඞཁ͕͋Γͦ͏ • Pingdom"ͱ͔ʁ • ຊ"Mackerel""Datadog"ͱΈ߹Θ͍ͤͨͳʙ !Hashicorp!meetup!2015/08/05!5!Yoshikawa!Ryota!(!@rrreeeyyy!)! 19