SlideShare une entreprise Scribd logo
1  sur  42
Shinken Monitoringについて真剣に
調べてみた結果www
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 ̄
Shinken Monitoring について
• 名前がかっこいい
• アイコンがかっこいい
使う理由を十分に満たしている
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つかえばええんや!ピコーン
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
結論
• いまいち優位性が感じられなかったが…
– スケーラビリティ
– モジュール便利…?
– “ビジネスインパクトにフォーカスする” の部分が使いこなせてない感
じする
• http://shinken-monitoring.org/#Slide4
– import-awsは便利
• Nagiosほぼ100%互換は良い
– 現在Nagiosを利用していてつらいなら考えても良いかも
– NagiosっぽいビューもThruk使えば無問題
• めっちゃオススメ出来る感じでもない
– Shinken enterprise版があるようなので、そちらはまた違うかも
ありがとうございました

Contenu connexe

Tendances

3分間 開発環境クッキング 2012.07 #pyfes
3分間 開発環境クッキング 2012.07 #pyfes3分間 開発環境クッキング 2012.07 #pyfes
3分間 開発環境クッキング 2012.07 #pyfes
Takeshi Komiya
 
Nagios大好きさんが喋るzabbixとAWS連携の話
Nagios大好きさんが喋るzabbixとAWS連携の話Nagios大好きさんが喋るzabbixとAWS連携の話
Nagios大好きさんが喋るzabbixとAWS連携の話
Takayuki Saito
 

Tendances (20)

Rancher meetuptokyo #4 Vagrant でつくる Rancher HA構成
Rancher meetuptokyo #4 Vagrant でつくる Rancher HA構成Rancher meetuptokyo #4 Vagrant でつくる Rancher HA構成
Rancher meetuptokyo #4 Vagrant でつくる Rancher HA構成
 
Drone.io のご紹介
Drone.io のご紹介Drone.io のご紹介
Drone.io のご紹介
 
3分間 開発環境クッキング 2012.07 #pyfes
3分間 開発環境クッキング 2012.07 #pyfes3分間 開発環境クッキング 2012.07 #pyfes
3分間 開発環境クッキング 2012.07 #pyfes
 
2014年を振り返る 今年の技術トレンドとDockerについて
2014年を振り返る 今年の技術トレンドとDockerについて2014年を振り返る 今年の技術トレンドとDockerについて
2014年を振り返る 今年の技術トレンドとDockerについて
 
Tech circle#13 zabbix3.0ハンズオン lld
Tech circle#13 zabbix3.0ハンズオン lldTech circle#13 zabbix3.0ハンズオン lld
Tech circle#13 zabbix3.0ハンズオン lld
 
Jenkins と groovy
Jenkins と groovyJenkins と groovy
Jenkins と groovy
 
Osc spring 20220311
Osc spring 20220311Osc spring 20220311
Osc spring 20220311
 
配布用Supervisordによるnode.jsの運用
配布用Supervisordによるnode.jsの運用配布用Supervisordによるnode.jsの運用
配布用Supervisordによるnode.jsの運用
 
大規模Node.jsを支える ロードバランスとオートスケールの独自実装
大規模Node.jsを支える ロードバランスとオートスケールの独自実装大規模Node.jsを支える ロードバランスとオートスケールの独自実装
大規模Node.jsを支える ロードバランスとオートスケールの独自実装
 
Bot Framework v4 開発 Tips 2018-11
Bot Framework v4  開発 Tips 2018-11Bot Framework v4  開発 Tips 2018-11
Bot Framework v4 開発 Tips 2018-11
 
Nuxt.js入門 2018/02/02 Vue.js入門勉強会@渋谷 発表資料
Nuxt.js入門 2018/02/02 Vue.js入門勉強会@渋谷 発表資料Nuxt.js入門 2018/02/02 Vue.js入門勉強会@渋谷 発表資料
Nuxt.js入門 2018/02/02 Vue.js入門勉強会@渋谷 発表資料
 
ザビ家の野望 〜 全自動ZABBIX AWS編 〜
ザビ家の野望 〜 全自動ZABBIX AWS編 〜ザビ家の野望 〜 全自動ZABBIX AWS編 〜
ザビ家の野望 〜 全自動ZABBIX AWS編 〜
 
20170111 macnica networks-nohara_rancher_usecase
20170111 macnica networks-nohara_rancher_usecase20170111 macnica networks-nohara_rancher_usecase
20170111 macnica networks-nohara_rancher_usecase
 
Nagios大好きさんが喋るzabbixとAWS連携の話
Nagios大好きさんが喋るzabbixとAWS連携の話Nagios大好きさんが喋るzabbixとAWS連携の話
Nagios大好きさんが喋るzabbixとAWS連携の話
 
PHP7を実際に動かしてみた@第96回PHP勉強会 #phpstudy
PHP7を実際に動かしてみた@第96回PHP勉強会 #phpstudyPHP7を実際に動かしてみた@第96回PHP勉強会 #phpstudy
PHP7を実際に動かしてみた@第96回PHP勉強会 #phpstudy
 
[使い倒し]GitHubのIssueとTFS/VSOのWorkItem連動に挑む(2015/08/26)
[使い倒し]GitHubのIssueとTFS/VSOのWorkItem連動に挑む(2015/08/26)[使い倒し]GitHubのIssueとTFS/VSOのWorkItem連動に挑む(2015/08/26)
[使い倒し]GitHubのIssueとTFS/VSOのWorkItem連動に挑む(2015/08/26)
 
づや会 Vol4 Node.jsとphpのパフォーマンスを比較してみる
づや会 Vol4 Node.jsとphpのパフォーマンスを比較してみるづや会 Vol4 Node.jsとphpのパフォーマンスを比較してみる
づや会 Vol4 Node.jsとphpのパフォーマンスを比較してみる
 
OSC 2014 Tokyo/Spring 「Zabbix 2.2を使ってみよう」
OSC 2014 Tokyo/Spring 「Zabbix 2.2を使ってみよう」OSC 2014 Tokyo/Spring 「Zabbix 2.2を使ってみよう」
OSC 2014 Tokyo/Spring 「Zabbix 2.2を使ってみよう」
 
azure障害は忘れたころにやってくる
azure障害は忘れたころにやってくるazure障害は忘れたころにやってくる
azure障害は忘れたころにやってくる
 
Jenkins に XFD を追加してみると
Jenkins に XFD を追加してみるとJenkins に XFD を追加してみると
Jenkins に XFD を追加してみると
 

En vedette (7)

CMDBuildを中心とした運用管理自動化基盤OpenPIEの事例紹介
CMDBuildを中心とした運用管理自動化基盤OpenPIEの事例紹介CMDBuildを中心とした運用管理自動化基盤OpenPIEの事例紹介
CMDBuildを中心とした運用管理自動化基盤OpenPIEの事例紹介
 
中国地方Db勉強会
中国地方Db勉強会中国地方Db勉強会
中国地方Db勉強会
 
Simplified Identity Management and Governance from One UI — The CA Identity S...
Simplified Identity Management and Governance from One UI — The CA Identity S...Simplified Identity Management and Governance from One UI — The CA Identity S...
Simplified Identity Management and Governance from One UI — The CA Identity S...
 
InfluxDB の概要 - sonots #tokyoinfluxdb
InfluxDB の概要 - sonots #tokyoinfluxdbInfluxDB の概要 - sonots #tokyoinfluxdb
InfluxDB の概要 - sonots #tokyoinfluxdb
 
Apache HBase 入門 (第1回)
Apache HBase 入門 (第1回)Apache HBase 入門 (第1回)
Apache HBase 入門 (第1回)
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
 
Scala Warrior and type-safe front-end development with Scala.js
Scala Warrior and type-safe front-end development with Scala.jsScala Warrior and type-safe front-end development with Scala.js
Scala Warrior and type-safe front-end development with Scala.js
 

Similaire à shinken monitoringについて真剣に調べてみた結果

Djangoとweb2pyをapacheに組込む
Djangoとweb2pyをapacheに組込むDjangoとweb2pyをapacheに組込む
Djangoとweb2pyをapacheに組込む
2bo 2bo
 
Building Static Website With Github And Jekyll
Building Static Website With Github And JekyllBuilding Static Website With Github And Jekyll
Building Static Website With Github And Jekyll
Yoji Shidara
 
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
yut148atgmaildotcom
 
個人で作っているgoのプロダクト by zchee編
個人で作っているgoのプロダクト by zchee編個人で作っているgoのプロダクト by zchee編
個人で作っているgoのプロダクト by zchee編
Koichi Shiraishi
 

Similaire à shinken monitoringについて真剣に調べてみた結果 (20)

GitLab から GitHub + CircleCI に乗り換えてチーム運用を改善しつつある話
GitLab から GitHub + CircleCI に乗り換えてチーム運用を改善しつつある話GitLab から GitHub + CircleCI に乗り換えてチーム運用を改善しつつある話
GitLab から GitHub + CircleCI に乗り換えてチーム運用を改善しつつある話
 
会社にGitHub Enterpriseを導入してみた話
会社にGitHub Enterpriseを導入してみた話会社にGitHub Enterpriseを導入してみた話
会社にGitHub Enterpriseを導入してみた話
 
Djangoとweb2pyをapacheに組込む
Djangoとweb2pyをapacheに組込むDjangoとweb2pyをapacheに組込む
Djangoとweb2pyをapacheに組込む
 
Jupyterで運用やってみた
Jupyterで運用やってみたJupyterで運用やってみた
Jupyterで運用やってみた
 
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
 
Metahub for github
Metahub for githubMetahub for github
Metahub for github
 
Building Static Website With Github And Jekyll
Building Static Website With Github And JekyllBuilding Static Website With Github And Jekyll
Building Static Website With Github And Jekyll
 
今時のオンプレなgithubクローン環境構築
今時のオンプレなgithubクローン環境構築今時のオンプレなgithubクローン環境構築
今時のオンプレなgithubクローン環境構築
 
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
 
個人で作っているgoのプロダクト by zchee編
個人で作っているgoのプロダクト by zchee編個人で作っているgoのプロダクト by zchee編
個人で作っているgoのプロダクト by zchee編
 
Yapc2012資料
Yapc2012資料Yapc2012資料
Yapc2012資料
 
Docker hands on nifty sakura jul19
Docker hands on nifty sakura jul19Docker hands on nifty sakura jul19
Docker hands on nifty sakura jul19
 
Filter・Mutator・Aggregateの使いドコロ
Filter・Mutator・Aggregateの使いドコロFilter・Mutator・Aggregateの使いドコロ
Filter・Mutator・Aggregateの使いドコロ
 
"Continuous Publication" with Python: Another Approach
"Continuous Publication" with Python: Another Approach"Continuous Publication" with Python: Another Approach
"Continuous Publication" with Python: Another Approach
 
Pythonによる非同期プログラミング入門
Pythonによる非同期プログラミング入門Pythonによる非同期プログラミング入門
Pythonによる非同期プログラミング入門
 
LingrBotを作ってみた/ ownCloud+Andoroid+Picasa+Flickr連携/Chromecast をLinuxで遊ぶ
LingrBotを作ってみた/ ownCloud+Andoroid+Picasa+Flickr連携/Chromecast をLinuxで遊ぶLingrBotを作ってみた/ ownCloud+Andoroid+Picasa+Flickr連携/Chromecast をLinuxで遊ぶ
LingrBotを作ってみた/ ownCloud+Andoroid+Picasa+Flickr連携/Chromecast をLinuxで遊ぶ
 
Openshift 20191121
Openshift 20191121Openshift 20191121
Openshift 20191121
 
勉強会 Cvml python基礎
勉強会 Cvml python基礎勉強会 Cvml python基礎
勉強会 Cvml python基礎
 
Openshift 20191128
Openshift 20191128Openshift 20191128
Openshift 20191128
 
unity build on github actions
unity build on github actionsunity build on github actions
unity build on github actions
 

Dernier

Dernier (10)

Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 

shinken monitoringについて真剣に調べてみた結果

Notes de l'éditeur

  1. Nagiosさよなら! Shinken最高〜♪
  2. なんか多い
  3. Nagiosは死んだ! Shinken最高〜♪
  4. IT にフォーカスするんじゃない、ビジネスにフォーカスするんだ。そのためには、物理的なIT環境じゃなくてアプリレイヤでものを見る必要がある。 500行のエラーを見たってしょうがない。1つの根本的な問題があって、残りの499個のエラーはそれに引きずられてるだけだ。shinken は、この499個をフィルタリングできる。 ビジネスにインパクトのある順にソートすれば、すぐに対応が必要なことと、コーヒー飲んでからでいいことを区別できる。