Ceilometer/blueprints/monitoring-metrics-object
< Ceilometer | blueprints
计量
在 Ceilometer 中,计量器以 Counter(namedtuple) 的形式轮询,如下所示,我们是否需要两个不同的对等对象,或者一个通用的较低级别的对象来同时处理计量器和指标?
Counter = collections.namedtuple('Counter',
' '.join([
'name',
'type',
'unit',
'volume',
'user_id',
'project_id',
'resource_id',
'timestamp',
'resource_metadata',
]))
监控指标
以监控指标为例,例如 ganglia 指标(Gmetad XML 转储)
-Host
-Cluster Name
-METRIC NAME="swap_free"
-VAL="2097148"
-TYPE="float"
-UNITS="KB"
-TN="138" - timestamp
-TMAX="180" (like a leasetime - freshness)
-DMAX="0" (how long to retain old records)
-SLOPE="both" (+ = counter, others = gauge)
映射
| Ceilometer Counter | Ganglia Metric |
|---|---|
| name | METRICNAME |
| delta|cumulative) | positive|negative|both) 更多来自元数据 |
| unit | UNITS |
| volume | VAL |
| user_id | None (适用于计量器,不适用于监控) |
| project_id | None (适用于计量器,不适用于监控) |
| resource_id(swift: tenant_id, compute:instance_id, glance:image_id) | Host (FQDN) |
| timestamp | Ganglia TN (当前时间 - TN = 指标发布的时间戳) |
| resource_metadata | NONE |