graphite +collectd搭建監控服務器記錄

假設已經安裝好graphite

1.在客戶端上安裝collectd,collectd-5.4.0.tar.bz2

執行./configure,make,make install 安裝,默認安裝位置是/opt/collectd

注意:要確保python插件在編譯後是yes的。

2.安裝graphite插件collectd-carbon

git clone https://github.com/indygreg/collectd-carbon.git /opt/collectd-plugins

3.編輯etc/collectd.conf,增加以下配置

 

<LoadPlugin "python">

   Globals true

</LoadPlugin>


<Plugin "python">

   # carbon_writer.py is at path /opt/collectd-plugins/carbon_writer.py

   ModulePath "/opt/collectd-plugins/"


   Import "carbon_writer"


   <Module "carbon_writer">

       LineReceiverHost "192.168.220.130"  #graphite服務器ip

       LineReceiverPort 2003               #carbon默認端口2003

       LineReceiverProtocol "tcp"

       DifferentiateCountersOverTime true

       LowercaseMetricNames true

       TypesDB "/opt/collectd/share/collectd/types.db"

   </Module>

</Plugin>

4.啓動collectd

/opt/collectd/sbin/collectd

5.截圖

6.參考資料

Graphite 和 collectd 建立監控服務器

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章