Skip to content

Instantly share code, notes, and snippets.

@mikeda
Created December 24, 2012 13:35
Show Gist options
  • Save mikeda/4369278 to your computer and use it in GitHub Desktop.
Save mikeda/4369278 to your computer and use it in GitHub Desktop.
muninのRRDファイルの設定情報をのぞいてみた
# Dumper(RRDs::info "/var/lib/munin/test01/test01-cpu-user-d.rrd")の抜粋
# けっきょくのところ
# 300秒ごとに監視。保存設定は以下4つ
# 1. 2日間、そのまま保存
# 2. 9日間、6回(30分)ごとのサマリで保存
# 3. 45日間、24回(2時間)ごとのサマリで保存
# 4. 450日間、288回(24時間)ごとのサマリで保存
$VAR1 = {
# 全体情報
# step(監視感覚)が300
'step' => 300,
'filename' => 'test01/test01-cpu-user-d.rrd',
'header_size' => 2880,
'last_update' => 1356346805,
'ds[42].index' => 0,
'ds[42].last_ds' => '5888612527',
'ds[42].max' => '5000',
'ds[42].min' => '0',
'ds[42].minimal_heartbeat' => 600,
'ds[42].type' => 'DERIVE',
'ds[42].unknown_sec' => 0,
'ds[42].value' => '2152.44296042921',
# RRA情報
# pdp_per_rowが保存する値を集約する期間
# rowsが保存するレコード数
# pdp_per_row:1
# step * pdp_per_row * rows /(24*60*60) : 2
# => 2日間はそのまま保存
'rra[0].cdp_prep[0].value' => undef,
'rra[0].cf' => 'AVERAGE',
'rra[0].cur_row' => 143,
'rra[0].pdp_per_row' => 1,
'rra[0].rows' => 576,
'rra[1].cdp_prep[0].value' => undef,
'rra[1].cf' => 'MIN',
'rra[1].cur_row' => 268,
'rra[1].pdp_per_row' => 1,
'rra[1].rows' => 576,
'rra[2].cdp_prep[0].value' => undef,
'rra[2].cf' => 'MAX',
'rra[2].cur_row' => 89,
'rra[2].pdp_per_row' => 1,
'rra[2].rows' => 576,
# pdp_per_row:6
# step * pdp_per_row * rows /(24*60*60) : 9
# => 9日間は6回(30分)ごとのサマリで保存
'rra[3].cdp_prep[0].value' => '0',
'rra[3].cf' => 'AVERAGE',
'rra[3].cur_row' => 287,
'rra[3].pdp_per_row' => 6,
'rra[3].rows' => 432,
'rra[4].cdp_prep[0].value' => 'inf',
'rra[4].cf' => 'MIN',
'rra[4].cur_row' => 382,
'rra[4].pdp_per_row' => 6,
'rra[4].rows' => 432,
'rra[5].cdp_prep[0].value' => '-inf',
'rra[5].cf' => 'MAX',
'rra[5].cur_row' => 98,
'rra[5].pdp_per_row' => 6,
'rra[5].rows' => 432,
# pdp_per_row:24
# step * pdp_per_row * rows /(24*60*60) : 45
# => 45日間は24回(2時間)ごとのサマリで保存
'rra[6].cdp_prep[0].value' => '3794.97165243773'
'rra[6].cf' => 'AVERAGE',
'rra[6].cur_row' => 505,
'rra[6].pdp_per_row' => 24,
'rra[6].rows' => 540,
'rra[7].cdp_prep[0].value' => '274.161286974847',
'rra[7].cf' => 'MIN',
'rra[7].cur_row' => 429,
'rra[7].pdp_per_row' => 24,
'rra[7].rows' => 540,
'rra[8].cdp_prep[0].value' => '370.69888971919',
'rra[8].cf' => 'MAX',
'rra[8].cur_row' => 213,
'rra[8].pdp_per_row' => 24,
'rra[8].rows' => 540,
# pdp_per_row:288
# step * pdp_per_row * rows /(24*60*60) : 45
# => 450日間は288回(24時間)ごとのサマリで保存
'rra[9].cdp_prep[0].value' => '71721.4802582367',
'rra[9].cf' => 'AVERAGE',
'rra[9].cur_row' => 218,
'rra[9].pdp_per_row' => 288,
'rra[9].rows' => 450,
'rra[10].cdp_prep[0].value' => '274.161286974847',
'rra[10].cf' => 'MIN',
'rra[10].cur_row' => 202,
'rra[10].pdp_per_row' => 288,
'rra[10].rows' => 450,
'rra[11].cdp_prep[0].value' => '1145.08596219951',
'rra[11].cf' => 'MAX',
'rra[11].cur_row' => 230,
'rra[11].pdp_per_row' => 288,
'rra[11].rows' => 450,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment