
我收集了運行情況,將效能資料(如CPU使用率或網路頻寬)放入rrd檔案中。
我的問題是,叢集中的每個節點都有一個檔案。
如何取得叢集的概覽圖?
(例如,我有 5 個節點,每個節點發送 10Mbit,因此圖表應顯示 50Mbit)
答案1
您只需為rrdtool 的DEF: 部分指定每個檔案。請參考下面我做的一個一次性的例子。請注意,其中一個是 foo_kbrandt_foo1,另一個是 foo_kbrandt_foo2。因此該圖是從兩個不同的 rrd 檔案中提取的。
rrdtool graph MessagesDeliveredPerMinInfomationStores.png \
--imgformat=PNG \
--title="Messages Delivered Per Minute" \
--base=1000 \
--height=600 \
--width=1000 \
--start='February 13 2009' \
--slope-mode \
--lower-limit=0 \
--vertical-label="Messages Delivered Per Minute" \
--step 10000 \
'DEF:a=/usr/local/nagios/var/rra/foo/foo_kbrandt_foo1_delivered.rrd:msg_per_min:AVERAGE' \
'LINE2:a#FF0000:arf Messages Per Minute\l' \
'GPRINT:a:AVERAGE:arf Delivered Average\: %7.2lf %s\j' \
'GPRINT:a:MAX:arf Delivered MAX\: %7.2lf %s\j' \
'DEF:b=/usr/local/nagios/var/rra/foo/foo_kbrandt_foo2_delivered.rrd:msg_per_min:AVERAGE' \
'LINE2:b#33FF33:blip Messages Per Minute\l' \
'GPRINT:b:AVERAGE:blip Delivered Average\: %7.2lf %s\j' \
'GPRINT:b:MAX:blip Delivered MAX\: %7.2lf %s\j' \