Bandwidth monitoring with Neutron and Ceilometer
来源:互联网 发布:wps表格数据求和 编辑:程序博客网 时间:2024/05/29 10:12
OpenStack Telemetry (aka Ceilometer) gives you access to a wealth of information – and a particularly interesting stat I wanted access to was outgoing bandwidth of my Neutron networks. Out of the box, Ceilometer gives you a rolled up cumulative stat for this with the following:
ceilometer sample-list --meter network.outgoing.bytes
This produces output like the following
This is fine, but when you’re trying to break down the network stats for something useful like billing since beginning of month, this makes it tricky – even though I’m sure I shouldn’t have to do this! I followed this excellent post
http://cjchand.wordpress.com/2014/01/16/transforming-cumulative-ceilometer-stats-to-gauges/ which describes this use-case brilliantly (and goes further with Logstash and Elastic Search) – where you can use Ceilometer’s Pipeline to transform data into a format that suits your use case. The key pieces of information from this article was as follows:
1. Edit the /etc/ceilometer/pipeline.yaml of your Controller and Compute hosts and add in the following lines
- name: network_stats interval: 10 meters: - "network.incoming.bytes" - "network.outgoing.bytes" transformers: - name: "rate_of_change" parameters: target: type: "gauge" scale: "1" publishers: - rpc://
2. Restart the ceilometer-agent-compute on each host
restart ceilometer-agent-compute
That’s it. We now have a “gauge” for our incoming and outgoing neutron
I wanted to see if I could answer the question with this data: how much outgoing bandwidth was used for any given network over a period of time (i.e since the start of the month).
It could be I misunderstand the cumulative stats (which tease me), but this was a useful exercise nonetheless! Now here is my ask of you – my bash fu below can be improved somewhat and would love to see it! My limited knowledge of Ceilometer, plus the lure of Bash, awk and sed, provided me with a script that outputs the following:
The (OMFG WTF has Kev wrote now) script, link below, loops through each of your Neutron networks, and outputs the number of outgoing bytes per Neutron network. Just make sure you’ve got ‘bc’ installed to calculate the floating numbers. If I’ve used and abused Ceilometer and awk too much, let me know!–tap
giving result like that :
instance-00001535-6b1bd401-4bb8-404b-9bae-0a3da79c068b-tap844d2678-83
where :
instance-00001535 is instance_name
6b1bd401-4bb8-404b-9bae-0a3da79c068b is instance_id
844d2678-83 is 11_first_char_of_interface_id
Do you know what to change to have an resource_id that is only the interface_id and not this crappy string chain ...
原文链接:
https://openstackr.wordpress.com/2014/05/23/bandwidth-monitoring-with-neutron-and-ceilometer/
- Bandwidth monitoring with Neutron and Ceilometer
- Ceilometer Neutron-Metering
- Monitoring Application Health with WMI and .NET
- Linux Performance Monitoring with Vmstat and Iostat Commands
- INFRASTRUCTURE TRACKING WITH PASSIVE MONITORING AND ACTIVE PROBING
- 《Monitoring with Ganglia》Chapter 2 Installing and Configuring Ganglia
- Linux Performance Monitoring with Vmstat and Iostat Commands
- Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Fedora 13
- Monitoring Clusters With SNMP
- Network monitoring with MRTG
- Process monitoring with OSSEC
- Monitoring with Thread
- Monitoring Tomcat with LoadRunner
- Monitoring with Ganglia
- monitoring with Prometheus
- JMX Management and Monitoring
- Nginx LOGGING AND MONITORING
- Kubernetes - Monitoring and Logging
- CSL(Chip Support Library,CSL)库函数简介
- 查看HDFS文件系统数据的三种方法
- How to evaluate and motivate a speech
- 如何学好Android 学习指南
- UIAlertController
- Bandwidth monitoring with Neutron and Ceilometer
- 2016多校联合第二场 HDU5735 Born Slippy 解题报告
- Spring 事务传递教程_有实例
- 利用二进制位求平均值
- 捕捉C#全局异常的事件处理
- ARM内核寄存器 两种状态 7种工作模式
- nodejs连接sqlserver数据库支持事物封装-mssql模块
- var
- leetcode_c++:栈:Binary Tree Postorder Traversal(145)