Sensor database model

Bases: Model

This table contains meta-data about available sensors in network equipment.

Information from this table is used to poll metrics and display graphs for sensor data.

Parameters:
  • id (AutoField) – Primary key: Id

  • oid (VarcharField) – Oid

  • unit_of_measurement (VarcharField) – Unit of measurement

  • data_scale (VarcharField) – Data scale

  • precision (IntegerField) – Precision

  • human_readable (VarcharField) – Human readable

  • name (VarcharField) – Name

  • internal_name (VarcharField) – Internal name

  • mib (VarcharField) – Mib

  • display_minimum_user (FloatField) – Display minimum user

  • display_maximum_user (FloatField) – Display maximum user

  • display_minimum_sys (FloatField) – Display minimum sys

  • display_maximum_sys (FloatField) – Display maximum sys

  • on_message_user (VarcharField) – On message user

  • on_message_sys (VarcharField) – On message sys

  • off_message_user (VarcharField) – Off message user

  • off_message_sys (VarcharField) – Off message sys

  • on_state_user (IntegerField) – On state user

  • on_state_sys (IntegerField) – On state sys

  • alert_type (IntegerField) – Alert type

Relationship fields:

Parameters:

Bases: ObjectDoesNotExist

Bases: MultipleObjectsReturned

Returns a Graph object describing a simple Graphite graph URL for this sensor.

Parameters:

format – The format of the desired graph, e.g. png or json

Return type:

Graph

Try to normalize the unit of measurement.

The unit_of_measurement is the value reported by the device, and is all sorts of stuff like percentRH, Celcius. Here we try to normalize those units (in a very basic way).

ipdevpoll sensor plugin

ipdevpoll plugin to collect sensor data.

This plugin can use any MibRetriever class that provides the get_all_sensors() method to discover and store information about physical environmental sensors available for readout on a device.

Which MibRetriever classes to use for each type of device is configured in the [sensors] and [sensors:vendormibs] sections of ipdevpoll.conf.

Bases: Plugin

Plugin to detect environmental sensors in netboxes

Collects sensors and feed them in to persistent store.

Returns a list of MibRetriever instances, as configured in ipdevpoll.conf, to use for retrieving sensors from this netbox.

Called as the plugin class is loaded in the plugin registry.

Can be used to perform any kind of initialization task that doesn’t fit into module-level initialization.