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
Shinken Monitoringについて真剣に調べてみた結果
Search
Tsuyoshi Torii
February 26, 2023
Technology
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Shinken Monitoringについて真剣に調べてみた結果
2014年 Monitoring Casualで発表した資料です
Tsuyoshi Torii
February 26, 2023
More Decks by Tsuyoshi Torii
See All by Tsuyoshi Torii
Claude Cowork全社展開のために、MCPゲートウェイを自作した話
toritori0318
2
120
TV連動サービスのリアルタイム通知を支える技術
toritori0318
0
140
作られては消えていく泡のように儚いクラスタの運用話
toritori0318
0
150
Chef SoloからItamaeに完全移行した話+
toritori0318
0
150
Docker3兄弟
toritori0318
2
7.3k
TV視聴参加型システムを支えるSocket.IOクラスタの裏側
toritori0318
12
3.9k
Other Decks in Technology
See All in Technology
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
360
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.5k
Google Cloud Next Tokyo 26登壇時のスクリプト
recruitengineers
PRO
0
210
しろおびから始める!ログ活用の第一歩
shumei_ito
0
810
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
110
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
340
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
570
go-sqletch
moznion
0
120
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
1
680
全PRの83%が AIレビューだけでマージできるようになった開発組織は その後どうなったか @2026/10
athug
0
130
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
550
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
620
Speed Design
sergeychernyshev
33
2.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
390
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Navigating Weather and Climate Data
rabernat
0
550
It's Worth the Effort
3n
188
29k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Design in an AI World
tapps
1
350
Facilitating Awesome Meetings
lara
57
7.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Transcript
Shinken Monitoringについて真剣に 調べてみた結果 2014/01/29 montoring cacual vol7 Tsuyoshi Torii (@toritori0318)
Bascule Inc.
自己紹介 • 鳥居 剛司 @toritori0318 • 株式会社バスキュール • TV連動プラットフォームサーバ開発/運用 •
Lua / Python / Golang / Node.js / Perl / Ruby • 二児の父
こんなインフラ環境です
現在 • Nagios+Munin(+Proteus monitor) – 古き良きモニタリングツール
欲しい監視ツール • ディスポーザブルなインフラ環境にマッチ – 自動で監視下に入る – ゴミ出ない – リアルタイム性 –
…
_人人人人人人人人人人人人人人人人人_ > Nagios + Munin、どう考えてもつらい <  ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄
None
Shinken Monitoring について • 名前がかっこいい • アイコンがかっこいい 使う理由を十分に満たしている
None
http://www.rohit.io/blog/rip-nagios-hello-docker-shinken.html
Blog要約 • アクティブな開発 • マルチDCデプロイメント – 無限にスケール! – しかも簡単! •
パフォーマンス – Nagios速い。けどShinkenもbooster-nrpeといったツールで工夫してる • モダン – 動的構成/AWS/shinkenモジュールインストーラなど豊富なサポート機 能を持っているよ • UI – Nagiosは古いけど多機能。それに比べてShinkenは現代的で洗練されたUI を持っている。ThrukやGraphiteとも連携可 • 簡単に切り替え – 設定はNagiosとほぼ100%互換!
なんか良さそう!ピコーン
まずはアーキテクチャを見てみよう
Architecture diagram with all daemons illustrated
うっ… なんか多くね?
Shinken daemon roles • Arbiter – 設定ファイル読み込む+可用性のためのデーモン。マスターが死んだ らスペアに再ルーティングなどするらしい。 • Scheduler
– PollerやReactionnerをチェックしてプールしたり。 • Poller – Schedulerによってリクエスト要求され、チェックプラグイン(nrpeなど)を 実行し、結果をSchedulerに返す。 • Reactionner – チェックプラグインの結果から、RSS/メール/イベントハンドラ通知な どする • Broker – Schedulerからのデータを管理。監視結果やログをデータとして出力し DBに保存する。
つかってみよう
Shinken インストール # shinkenユーザ必須 adduser shinken # pip pip install
shinken # デーモン設定 service shinken start chkconfig shinken on
ディレクトリ構造 • /etc/shinken/shinken.cfg # ルートコンフィグ • /etc/shinken # コンフィグファイル群 •
/var/lib/shinken # shinkenモジュール • /var/log/shinken # ログ • /var/run/shinken # pidファイル • Shinken install モジュール – /var/lib/shinken/modules # ライブラリ実体 – /etc/shinken/modules/* # config
shinken コマンド # セットアップ shinken --init # モジュールインストール shinken install
<module> # モジュール検索 shinken search <module>
WebUIインストール
WebUIインストール # shinken install sudo shinken install webui sudo shinken
install auth-cfg-password sudo shinken install sqlitedb # コンフィグ設定: broker vi /etc/shinken/brokers/broker-master.cfg modules webui # コンフィグ設定: webui vi /etc/shinken/modules/webui.cfg modules auth-cfg-password, sqlitedb # デーモン再起動 sudo service shinken restart # 以下のURLにアクセス http://<host>:7767/
ちょっと面倒になってきた
http://www.rohit.io/blog/rip-nagios-hello-docker-shinken.html
Dockerつかえばええんや!ピコーン
None
Dockerイメージで楽ちん〜 1. WebUI – Shinken WebUI基本形 – http://localhost/ 2. Thruk
UI – Thruk入りWebUI – http://localhost/thruk/ 3. Graphs – Graphite入りWebUI – http://localhost/service/docker_shinken/http_port_7770 #graphs https://github.com/rohit01/docker_shinken.git
Dockerイメージで楽ちん〜 # git clone git clone https://github.com/rohit01/docker_shinken.git # 1. webui
cd docker_shinken/shinken_basic sudo docker run -d -v "$(pwd)/custom_configs:/etc/shinken/custom_configs" \ -p 80:80 rohit01/shinken # 2. webui + thruk cd docker_shinken/shinken_thruk sudo docker run -d -v "$(pwd)/custom_configs:/etc/shinken/custom_configs" \ -p 80:80 rohit01/shinken_thruk # 3. webui + thruk + graphite cd docker_shinken/shinken_thruk_graphite sudo docker run -d -v "$(pwd)/custom_configs:/etc/shinken/custom_configs" \ -p 80:80 rohit01/shinken_thruk_graphite
実際の動きを見てみましょう(demo)
使えそう?なプラグインたち • ホスト管理系 – import-aws • 監視系 – booster-nrpe –
linux-snmp – linux-ssh
import-aws
import-awsを使ってみる • インストール # pip sudo pip install apache-libcloud #
import-aws sudo shinken install import-aws
import-awsを使ってみる # import-awsコンフィグ $ cat /etc/shinken/module/import-aws.cfg define module { module_name
AWS module_type aws_import # Configure your REAL api_key and secret from AWS api_key xxxxxxxxxxxxxxxxxxx secret xxxxxxxxxxxxxxxxxxx regions ec2_ap_northeast ; default_template generic-host ; }
import-awsを使ってみる # arbiterコンフィグ $ cat /etc/shinken/arbiters/arbiter-master.cfg … modules AWS …
import-awsを使ってみる
import-awsを使ってみる default_template名 “use” タグの値 “EC2” 固定
import-awsを使ってみる
import-awsを使ってみる # 自動生成されるhostコンフィグ define host { host_name i-xxxxxxx address x.x.x.x
use hogehoge, generic-host,EC2 _EC2_AVAILABILITY ap-northeast-1 … }
その他気になったところ • Configエラーでもデーモン起動はOK出す • shinkenサイトがhttp
None
結論 • いまいち優位性が感じられなかったが… – スケーラビリティ – モジュール便利…? – “ビジネスインパクトにフォーカスする” の部分が使いこなせてない感じ
する • http://shinken-monitoring.org/#Slide4 – import-awsは便利 • Nagiosほぼ100%互換は良い – 現在Nagiosを利用していてつらいなら考えても良いかも – NagiosっぽいビューもThruk使えば無問題 • めっちゃオススメ出来る感じでもない – Shinken enterprise版があるようなので、そちらはまた違うかも
ありがとうございました