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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tsuyoshi Torii
February 26, 2023
Technology
400
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
Transcript
42 slides
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版があるようなので、そちらはまた違うかも
ありがとうございました
More Decks by Tsuyoshi Torii
See All by Tsuyoshi Torii
Claude Cowork全社展開のために、MCPゲートウェイを自作した話
toritori0318
2
120
TV連動サービスのリアルタイム通知を支える技術
toritori0318
0
140
作られては消えていく泡のように儚いクラスタの運用話
toritori0318
0
160
Chef SoloからItamaeに完全移行した話+
toritori0318
0
160
Docker3兄弟
toritori0318
2
7.4k
TV視聴参加型システムを支えるSocket.IOクラスタの裏側
toritori0318
12
3.9k
Other Decks in Technology
See All in Technology
Is the Website Dying?
miriamschwab
0
220
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.4k
フロントエンドのテストカバレッジは 100%強制がいい
bengo4com
7
3k
セキュリティチームは どのコンテナイメージの脆弱性対応を優先すべきか 〜CISA新指針とSCCで作る脆弱性トリアージ〜
swdtkuy
0
340
gradle-best-practices 使ってみた
mikanichinose
0
240
AWS WAF あなたの推しサービス教えて!LT #jawsugosaka @fillz_noh
fillznoh
1
110
そのイメージ、どのCIが作った? Artifact Attestationsで来歴を固定する / Which CI system created that image? Pinning provenance with Artifact Attestations
chmikata
0
280
社内アプリ基盤「Quartz」による、 非エンジニアとAIに本番デプロイを 任せても壊れないプラットフォームの設計
staka121
PRO
1
240
Platform Engineering をベースとした Agentic Software Factory の実践
110y
3
1k
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
150
Test Impact Analysis を武器に立ち向かう、AI 時代のテスト増加に対するヌーラボのアプローチ / getting-started-datadog-test-impact-analysis
k6s4i53rx
3
880
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
300
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
1.4k
How GitHub (no longer) Works
holman
316
150k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
630
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
Statistics for Hackers
jakevdp
799
230k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Embracing the Ebb and Flow
colly
88
5.2k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
560
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400