API 文档
文档目录
    加载中
文档中心 API 文档 使用开源软件 collectd 上报系统指标

使用开源软件 collectd 上报系统指标

collectd 下载页: http://collectd.org/download.shtml

以源码安装 collectd 为例:

wget http://collectd.org/files/collectd-5.4.1.tar.gz
tar -xvzf collectd-5.4.1.tar.gz
cd collectd-5.4.1
./configure && make && sudo make install

若您在 CentOS 5 上安装失败,请尝试:

./configure --disable-iptables && make && sudo make install

修改配置文件,指定上报服务器:

sudo vim /opt/collectd/etc/collectd.conf

替换:

#LoadPlugin write_graphite

为:

LoadPlugin write_graphite

搜索 Plugin write_graphite 对应的配置块, 取消注释,并做相应的修改:

<Plugin write_graphite>
  <Node "example">
    Host "collector.monitor.dnspod.cn"
    Port "2003"
    Protocol "tcp"
    LogSendErrors true
    Prefix "授权码/域名/IP/"   # 例如:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/test.com/192.168.1.111/"
    Postfix ""
    StoreRates true
    AlwaysAppendDS false
    EscapeCharacter "_"
  </Node>
</Plugin>

启动 collectd:

sudo /opt/collectd/sbin/collectd
最近更新于 2022-01-24 11:50

DNSPod 域名检测工具

查询域名信息,快速排查网站问题

网站自助排障

快速判断问题、提供合适的解决方案