Replace deprecated snmp metrics

Change-Id: I9306afe72601baf87ca4767c15e719ec6d23dfe7
This commit is contained in:
Mehdi Abaakouk 2018-07-25 20:10:46 +02:00 committed by Mehdi Abaakouk (sileht)
parent 47e318ad6c
commit 8fd68396af
6 changed files with 96 additions and 9 deletions

View File

@ -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

View File

@ -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:

View File

@ -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):

View File

@ -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
~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -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

View File

@ -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.