diff --git a/ceilometer/hardware/pollsters/data/snmp.yaml b/ceilometer/hardware/pollsters/data/snmp.yaml index cc4bbe26e1..c720c0b292 100644 --- a/ceilometer/hardware/pollsters/data/snmp.yaml +++ b/ceilometer/hardware/pollsters/data/snmp.yaml @@ -28,6 +28,7 @@ metric: oid: "1.3.6.1.4.1.2021.10.1.3.3" type: "lambda x: float(str(x))" + # hardware.cpu.util is deprecated - name: hardware.cpu.util unit: "%" type: gauge @@ -35,6 +36,43 @@ metric: matching_type: "type_exact" oid: "1.3.6.1.4.1.2021.11.9.0" type: "int" + + - name: hardware.cpu.user + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.50.0" + type: "int" + - name: hardware.cpu.nice + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.51.0" + type: "int" + - name: hardware.cpu.system + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.52.0" + type: "int" + - name: hardware.cpu.idle + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.53.0" + type: "int" + - name: hardware.cpu.wait + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.54.0" + type: "int" + - name: hardware.cpu.kernel + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.55.0" + type: "int" + - name: hardware.cpu.interrupt + snmp_inspector: + matching_type: "type_exact" + oid: "1.3.6.1.4.1.2021.11.56.0" + type: "int" + # disk - name: hardware.disk.size.total unit: KB @@ -209,6 +247,7 @@ metric: oid: "1.3.6.1.2.1.4.3.0" type: "int" #system stats + # hardware.system_stats.cpu.idle is deprecated - name: hardware.system_stats.cpu.idle unit: "%" type: gauge diff --git a/ceilometer/publisher/data/gnocchi_resources.yaml b/ceilometer/publisher/data/gnocchi_resources.yaml index 78da29fcd5..d2878a24b8 100644 --- a/ceilometer/publisher/data/gnocchi_resources.yaml +++ b/ceilometer/publisher/data/gnocchi_resources.yaml @@ -262,6 +262,20 @@ resources: hardware.cpu.load.5min: hardware.cpu.load.15min: hardware.cpu.util: + hardware.cpu.user: + archive_policy_name: ceilometer-low-rate + hardware.cpu.nice: + archive_policy_name: ceilometer-low-rate + hardware.cpu.system: + archive_policy_name: ceilometer-low-rate + hardware.cpu.idle: + archive_policy_name: ceilometer-low-rate + hardware.cpu.wait: + archive_policy_name: ceilometer-low-rate + hardware.cpu.kernel: + archive_policy_name: ceilometer-low-rate + hardware.cpu.interrupt: + archive_policy_name: ceilometer-low-rate hardware.memory.total: hardware.memory.used: hardware.memory.swap.total: diff --git a/ceilometer/publisher/gnocchi.py b/ceilometer/publisher/gnocchi.py index 25fc9c02fe..1a70d61931 100644 --- a/ceilometer/publisher/gnocchi.py +++ b/ceilometer/publisher/gnocchi.py @@ -263,9 +263,9 @@ class GnocchiPublisher(publisher.ConfigPublisherBase): archive_policy_default, archive_policy_override, plugin_manager)) - except Exception as exc: - LOG.error("Failed to load resource due to error %s" % - exc) + except Exception: + LOG.error("Failed to load resource due to error", + exc_info=True) return resource_defs, data.get("archive_policies", []) def ensures_archives_policies(self): diff --git a/doc/source/admin/telemetry-measurements.rst b/doc/source/admin/telemetry-measurements.rst index a0564e8e40..2d9c205b97 100644 --- a/doc/source/admin/telemetry-measurements.rst +++ b/doc/source/admin/telemetry-measurements.rst @@ -421,9 +421,6 @@ SNMP: | hardware.cpu.load.\ | Gauge | proc\| host ID | Pollster | CPU load in the | | 15min | | ess | | | past 15 minutes | +---------------------+-------+------+----------+----------+------------------+ -| hardware.cpu.util | Gauge | % | host ID | Pollster | cpu usage | -| | | | | | percentage | -+---------------------+-------+------+----------+----------+------------------+ | hardware.disk.size\ | Gauge | KB | disk ID | Pollster | Total disk size | | .total | | | | | | +---------------------+-------+------+----------+----------+------------------+ @@ -477,9 +474,6 @@ SNMP: | ocks | | | | | nt to block dev\ | | | | | | | ice | +---------------------+-------+------+----------+----------+------------------+ -| hardware.system_st\ | Gauge | % | host ID | Pollster | CPU idle percen\ | -| ats.cpu.idle | | | | | tage | -+---------------------+-------+------+----------+----------+------------------+ | **Meters added in the Queens release** | +---------------------+-------+------+----------+----------+------------------+ | hardware.disk.read.\| Gauge | B | disk ID | Pollster | Bytes read from | @@ -494,6 +488,25 @@ SNMP: | hardware.disk.write\| Gauge | requ\| disk ID | Pollster | Write requests to| | .requests | | ests | | | device since boot| +---------------------+-------+------+----------+----------+------------------+ +| **Meters added in the Stein release** | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.user | Gauge | tick | host ID | Pollster | CPU user in tick | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.system | Gauge | tick | host ID | Pollster | CPU system in t\ | +| | | | | | ick | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.nice | Gauge | tick | host ID | Pollster | CPU nice in tick | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.idle | Gauge | tick | host ID | Pollster | CPU idle in tick | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.wait | Gauge | tick | host ID | Pollster | CPU wait in tick | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.kernel | Gauge | tick | host ID | Pollster | CPU kernel in t\ | +| | | | | | ick | ++---------------------+-------+------+----------+----------+------------------+ +| hardware.cpu.inter\ | Gauge | tick | host ID | Pollster | CPU interrupt i\ | +| rupt | | | | | n tick | ++---------------------+-------+------+----------+----------+------------------+ OpenStack Image service ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/ceilometer/polling.yaml b/etc/ceilometer/polling.yaml index a986d32130..f4eb3340d6 100644 --- a/etc/ceilometer/polling.yaml +++ b/etc/ceilometer/polling.yaml @@ -15,6 +15,13 @@ sources: - disk.device.write.bytes - disk.device.write.requests - hardware.cpu.util + - hardware.cpu.user + - hardware.cpu.nice + - hardware.cpu.system + - hardware.cpu.idle + - hardware.cpu.wait + - hardware.cpu.kernel + - hardware.cpu.interrupt - hardware.memory.used - hardware.memory.total - hardware.memory.buffer diff --git a/releasenotes/notes/snmp-cpu-util-055cd7704056c1ce.yaml b/releasenotes/notes/snmp-cpu-util-055cd7704056c1ce.yaml new file mode 100644 index 0000000000..fc34d6389b --- /dev/null +++ b/releasenotes/notes/snmp-cpu-util-055cd7704056c1ce.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + new metrics are available for snmp polling hardware.cpu.user, + hardware.cpu.nice, hardware.cpu.system, hardware.cpu.idle, + hardware.cpu.wait, hardware.cpu.kernel, hardware.cpu.interrupt. + They replace deprecated hardware.cpu.util and + hardware.system_stats.cpu.idle. + +deprecations: + - | + metrics hardware.cpu.util and hardware.system_stats.cpu.idle are now + deprecated. Other hardware.cpu.* metrics should be used instead. +