修改OpenStack下ceilometer采集数据的时间周期

原创
2016/09/26 14:45
阅读数 554

在重新搭建问OpenStack后,还原我们已有的系统发现,数据时有时无 后来师兄说是OpenStack的ceilometer默认的采集时间周期是10分钟,对于我们的系统来时说是太长了,因此修改默认的采集时间周期

#控制节点
root@controller:/etc/ceilometer# cd /etc/ceilometer/
root@controller:/etc/ceilometer# vim pipeline.yaml 
--
sources:
    - name: meter_source
      interval: 10 #将这里的默认的600(10分钟)修改为10秒
      meters:
          - "*"
      sinks:
          - meter_sink
    - name: cpu_source
      interval: 10 #将这里的默认的600(10分钟)修改为10秒
      meters:
          - "cpu"
      sinks:
          - cpu_sink
          - cpu_delta_sink
    - name: disk_source
      interval: 10 #将这里的默认的600(10分钟)修改为10秒
      meters:
          - "disk.read.bytes"
          - "disk.read.requests"
          - "disk.write.bytes"
          - "disk.write.requests"
          - "disk.device.read.bytes"
          - "disk.device.read.requests"
          - "disk.device.write.bytes"
          - "disk.device.write.requests"
      sinks:
          - disk_sink
    - name: network_source
      interval: 10 #将这里的默认的600(10分钟)修改为10秒
      meters:
          - "network.incoming.bytes"
          - "network.incoming.packets"
          - "network.outgoing.bytes"
          - "network.outgoing.packets"
      sinks:
          - network_sink
编辑完之后重启ceilometer服务
cd /etc/init.d/; for i in $( ls ceilometer-* ); do sudo service $i restart; done
#在其他计算节点
root@compute02:/etc/ceilometer# pwd
/etc/ceilometer
root@compute02:/etc/ceilometer# vim pipeline.yaml 
---
sources:
    - name: meter_source
      interval: 10 #将这里的默认的600(10分钟)修改为10秒
      meters:
          - "*"
      sinks:
          - meter_sink
    - name: cpu_source
      interval: 10
      meters:
          - "cpu"
      sinks:
          - cpu_sink
          - cpu_delta_sink
    - name: disk_source
      interval: 10
      meters:
          - "disk.read.bytes"
          - "disk.read.requests"
          - "disk.write.bytes"
          - "disk.write.requests"
          - "disk.device.read.bytes"
          - "disk.device.read.requests"
          - "disk.device.write.bytes"
          - "disk.device.write.requests"
      sinks:
          - disk_sink
    - name: network_source
      interval: 10
      meters:
          - "network.incoming.bytes"
          - "network.incoming.packets"
          - "network.outgoing.bytes"
          - "network.outgoing.packets"
      sinks:
          - network_sink
#重启服务
root@compute02:/etc/ceilometer# /etc/init.d/ceilometer-agent-compute restart 
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部