Sensu influxDB Grafana cheat sheet: Difference between revisions
Jump to navigation
Jump to search
Line 70: | Line 70: | ||
*なかなか良い情報 | *なかなか良い情報 | ||
[http://www.rittmanmead.com/2015/02/obiee-monitoring-and-diagnostics-with-influxdb-and-grafana/ Rittman Mead Consulting » OBIEE Monitoring and Diagnostics with InfluxDB and Grafana] | [http://www.rittmanmead.com/2015/02/obiee-monitoring-and-diagnostics-with-influxdb-and-grafana/ Rittman Mead Consulting » OBIEE Monitoring and Diagnostics with InfluxDB and Grafana] | ||
*Derivative の場合の Group by Time | |||
当然ですがサンプルが2個以上ないといけないので、ポーリング間隔の倍以上にする。(気付かずにハマりました...) |
Revision as of 12:24, 27 May 2015
Sensu influxDB Grafana 実験
Sensu
- omnibus installer
- ruby の環境を維持するのが良いので /etc/default/sensu は
EMBEDDED_RUBY=true
- /opt/sensu/embedded/bin/ruby を維持
- sensu plugin
- gem でインストールするまえに ~/.gemrc におまじない
gem: --no-ri --no-rdoc
- また現在は再編中とのことで、gem install には
--prerelease
- オプションが必要
- config
- 複数台の client で役割にあわせて checks かえるために subscriptions をうまく使う
"subscriptions": [ "linux", "load_balance" ]
influxDB
- メンテナンス
Ruby CLI for InfluxDB
InfluxDB Query Language
db.get_database_list db.database use sensu db.database SELECT * FROM /.*/ LIMIT 1 db.query('SELECT * FROM /.*/ LIMIT 1').keys DELETE FROM /cpu_cpu0_.*/ SELECT * FROM * WHERE host=production SELECT * FROM /cpu_.*/ WHERE host=production SELECT * FROM * WHERE host=production SELECT * FROM /cpu_.*/ WHERE host=production DELETE FROM /cpu_.*/ WHERE time < now() - 24h DELETE FROM /memory_.*/ WHERE time < now() - 24h
Grafana
- influxdb query で複数のホストから任意のホストのメトリックスを抽出
select mean(value) from "cpu_system" where $timeFilter and host = 'host3' group by time($interval) order asc
- and host = 'host3' に注目
- Templated dashboard 便利かも
Grafana - InfluxDB Templated Queries
- これを参考にホゲる!
- もちろんこれも
Grafana - InfluxDB
- meam(0 - value) おーーナイスなテクニック
- なかなか良い情報
Rittman Mead Consulting » OBIEE Monitoring and Diagnostics with InfluxDB and Grafana
- Derivative の場合の Group by Time
当然ですがサンプルが2個以上ないといけないので、ポーリング間隔の倍以上にする。(気付かずにハマりました...)