MackerelによるデータビジュアライゼーションとGraphite
TIME rest time current/total
TopicsPlaceHolder

MackerelによるデータビジュアライゼーションとGraphite

GREE TECH TALK #10

Mar 24th, 2016

Profile

songmu

 

とにかくサーバー状況を可視化・アラート設定

Mackerelによる可視化

テーマ機能

線グラフ

積み上げグラフ

Alert

プラグインはSensu互換出力形式

% mackerel-plugin-uptime
uptime.seconds  1573858.000000  1458815736

API完備

http://help-ja.mackerel.io/entry/spec/api/v0

curl https://mackerel.io/api/v0/services/test/tsdb -H 'X-Api-Key: xxxxxxxx' -H 'Content-Type: application/json' -X POST -d '[{"name": "Sample.foo", "time": '$(date +%s)', "value": 30}, {"name": "Sample.bar", "time": '$(date +%s)', "value": 100}]'

コマンドラインツール

mkr throw

% cat <<EOF | mkr throw --host <hostId>
<name>  <value> <time>
<name>  <value> <time>
EOF

% cat <<EOF | mkr throw --service My-Service
<name>  <value> <time>
<name>  <value> <time>
EOF

最近のアップデート

mamcachedのhitrate

alias(
    divide(
      host('HostIdXXXXX', 'custom.memcached.hitmiss.get_hits'),
      host('HostIdXXXXX', 'custom.memcached.cmd.cmd_get')
  ),
  'hitrate'
)

一週間前の値との比較

group(
  alias(
    avg(
      timeShift(
        roleSlots('some:app','loadavg5'),
        '1w'
      )
    ),
    'avg-lastweek'
  ),
  alias(
    avg(
      roleSlots('some:app','loadavg5')
    ),
    'avg'
  )
)

graph builder

https://gist.github.com/stanaka/eae027169de6a35dd76a

Graphite

Graphiteの構成

実はLogoがあった

I acknowledge that most people are probably consuming Graphite with a nice frontend like Grafana so they'll probably never notice this change, but it bothers me so I'm going to fix it anyways.

公式サイト

http://graphite.readthedocs.org/en/latest/

線形回帰

→ 将来予測機能の足がかりに

https://github.com/graphite-project/graphite-web/pull/1447

将来予測機能作成中

連続リリース継続中

 

We are Hiring

hatena