Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Shinken Monitoringについて真剣に調べてみた結果
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tsuyoshi Torii
February 26, 2023
Technology
370
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
140
Docker3兄弟
toritori0318
2
7.3k
TV視聴参加型システムを支えるSocket.IOクラスタの裏側
toritori0318
12
3.9k
Other Decks in Technology
See All in Technology
20分でわかるセキュアAPI
nwiizo
1
200
JavaScript 研修 (2026)
recruitengineers
PRO
2
470
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
サイバー捜査員研修(前半)
nomizone
1
1.9k
ホームラボ紹介
y_sera15
0
130
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
150
制約理論(ToC)入門 2026版
recruitengineers
PRO
7
2.1k
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
210
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
190
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
660
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
240
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
220
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
440
Six Lessons from altMBA
skipperchong
29
4.4k
How GitHub (no longer) Works
holman
316
150k
Building an army of robots
kneath
306
46k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
360
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Believing is Seeing
oripsolob
1
180
Test your architecture with Archunit
thirion
1
2.3k
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版があるようなので、そちらはまた違うかも
ありがとうございました