Module Contents

class noc.core.script.oidrules.oid.OIDRule(oid, type=None, scale=1, path=None)

Bases: object

SNMP OID generator for SNMP_OIDS

name = oid
default_type = gauge
_convert_scale(self, scale)

Convert scale expression to callable or constant :param scale: :return:

iter_oids(self, script, metric)

Generator yielding oid, type, scale, path :param script: :param metric: :return:

classmethod from_json(cls, data)
classmethod expand(cls, template, context)

Expand {{ var }} expressions in template with given context :param template: :param context: :return:

expand_oid(self, **kwargs)

Apply kwargs to template and return resulting oid :param kwargs: :return:

classmethod _build_scale_locals(cls)

Build locals for scale evaluation :return: