The ceilometer.hardware.inspector.snmp Module

The ceilometer.hardware.inspector.snmp Module

Inspector for collecting data over SNMP

exception ceilometer.hardware.inspector.snmp.SNMPException[source]

Bases: exceptions.Exception

class ceilometer.hardware.inspector.snmp.SNMPInspector[source]

Bases: ceilometer.hardware.inspector.base.Inspector

classmethod construct_metadata(oid_cache, meta_defs, suffix='', host=None)[source]
static find_matching_oids(oid_cache, oid, match_type, find_one=True)[source]
static get_oid_value(oid_cache, oid_def, suffix='', host=None)[source]
inspect_generic(host, cache, extra_metadata, param)[source]

A generic inspect function.

  • host – the target host
  • cache – cache passed from the pollster
  • extra_metadata – extra dict to be used as metadata
  • param – a dict of inspector specific param

an iterator of (value, metadata, extra) containing the sample value, metadata dict to construct sample’s metadata, and extra dict of extra metadata to help constructing sample


Parse the params to a format which the inspector itself recognizes.

Parameters:param – inspector params from meter definition file
Returns:a dict of param which the inspector recognized
ceilometer.hardware.inspector.snmp.parse_snmp_return(ret, is_bulk=False)[source]

Check the return value of snmp operations

  • ret – a tuple of (errorIndication, errorStatus, errorIndex, data) returned by pysnmp
  • is_bulk – True if the ret value is from GetBulkRequest

a tuple of (err, data) err: True if error found, or False if no error found data: a string of error description if error found, or the

actual return data of the snmp operation

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.