6.26. Pollers

The pollers API provides functionality for periodic collection of IPMI and SNMP data.

6.26.1. IPMI

IPMI Pollers can be standalone or can be associated with a node. When an IPMI poller is associated with a node, it will attempt to use that node’s IPMI OBM settings in order to communicate with the BMC. Otherwise, the poller must be manually configured with that node’s IPMI settings.

If a node is found via discovery and contains a BMC catalog, then five IPMI pollers are automatically created for that node. The five pollers correspond to the “power”, “selInformation”, “sel”, “sdr” and “uid” (chassis LED) commands. These pollers do not collect data until the node has been configured with IPMIOBM settings.

Custom alerts for “sel” command IPMI pollers can be manually configured in their data definition, based on string and/or regex matching. IPMI pollers for the “sdr” command will automatically publish alerts onto an AMQP channel if any sensors of type “threshold” hold a value that does not equal “Not Available” or “ok”. See the Alerts section below for more information.

6.26.2. SNMP

SNMP pollers can be standalone or associated with a node. When an SNMP poller is associated with a node, it attempts to use that node’s snmpSettings in order to communicate via SNMP. Otherwise, the poller must be manually configured with that node’s SNMP settings.

If a node with “type”: “switch” is created via the /nodes API with autoDiscover set to true, then six SNMP-based metric pollers will be created automatically for that node (see the Metric pollers section below for a list of these).

Example request to create and auto-discover a switch:

POST /api/current/nodes
Content-Type: application/json

{
  "name": "my switch",
  "identifiers": [],
  "snmpSettings": {
    "host": "10.1.1.3",
    "community": "public"
  },
  "type": "switch",
  "autoDiscover": true
}

6.26.3. Metric Pollers

In some cases, the data desired from a poller may require more complex processing than simply running an IPMI or SNMP command and parsing it. To address this, there is a poller type called a metric. A metric uses SNMP or IPMI, but can make multiples of these calls in aggregate and add post-processing logic to the results. There are currently six metrics available in the RackHD system:

  • snmp-interface-state
  • snmp-interface-bandwidth-utilization
  • snmp-memory-usage
  • snmp-processor-load
  • snmp-txrx-counters
  • snmp-switch-sensor-status

These metrics use SNMP to query multiple sources of information in order to calculate result data. For example, the bandwidth utilization metric calculates the delta between two sources of poll data at different times in order to produce data about how much network bandwidth is flowing through each interface.

6.26.4. API commands

When running the on-http process, these are some common API commands you can send:

Get available pollers in the library

GET /api/current/pollers/library
curl <server>/api/current/pollers/library

Create a new SNMP poller with a node

To use an SNMP poller that references a node, the node document must have an “snmpSettings” field with a host and community fields:

// example node document with snmp settings
{
  "name": "example node",
  "identifiers": [],
  "snmpSettings": {
    "host": "10.1.1.3",
    "community": "public"
  }
}
POST /api/current/pollers
{
    "type": "snmp",
    "pollInterval": 10000,
    "node": "54daadd764f1a8f1088fdc42",
    "config": {
      "oids": [
        "IF-MIB::ifSpeed",
        "IF-MIB::ifOperStatus"
      ]
    }
}
curl -X POST \
    -H 'Content-Type: application/json' \
    -d '{"type":"snmp","pollInterval":10000,"node":"54daadd764f1a8f1088fdc42",
        "config":{"oids":["IF-MIB::ifSpeed","IF-MIB::ifOperStatus"}}' \
    <server>/api/current/pollers

Create a New IPMI Poller With a Node

POST /api/current/pollers
{
    "type": "ipmi",
    "pollInterval": 10000,
    "node": "54daadd764f1a8f1088fdc42",
    "config": {
      "command": "power"
    }
}
curl -X POST \
    -H 'Content-Type: application/json' \
    -d '{"type":"ipmi","pollInterval":10000,"node":"54daadd764f1a8f1088fdc42",
        "config":{"command":"power"}}' \
    <server>/api/current/pollers
{
  "node": "54daadd764f1a8f1088fdc42",
  "config": {
    "command": "power"
  },
  "pollInterval": 10000,
  "lastStarted": null,
  "lastFinished": null,
  "failureCount": 0,
  "createdAt": "2015-02-11T20:50:41.663Z",
  "updatedAt": "2015-02-11T20:50:41.663Z",
  "id": "54dbc0a11eaecfc22a30d59b",
  "type": "ipmi"
}

Create a New IPMI Poller Without a Node

POST /api/current/pollers
{
    "type": "ipmi",
    "pollInterval": 10000,
    "config": {
      "command": "power",
      "host": "10.1.1.2",
      "user": "admin",
      "password": "admin"
    }
}
curl -X POST \
    -H 'Content-Type: application/json' \
    -d '{"type":"ipmi","pollInterval":10000,"node":"54daadd764f1a8f1088fdc42",
        "config":{"command":"power","host":"10.1.1.2","user":"admin","password":"admin"}}' \
    <server>/api/current/pollers
{
  "node": null,
  "config": {
    "command": "power",
    "host": "10.1.1.2",
    "user": "admin",
    "password": "admin"
  },
  "pollInterval": 10000,
  "lastStarted": null,
  "lastFinished": null,
  "failureCount": 0,
  "createdAt": "2015-02-11T20:50:41.663Z",
  "updatedAt": "2015-02-11T20:50:41.663Z",
  "id": "54dbc0a11eaecfc22a30d59b",
  "type": "ipmi"
}

Create a New SNMP Poller

POST /api/current/pollers
{
    "type": "snmp",
    "pollInterval": 10000,
    "config": {
      "host": "10.1.1.3",
      "communityString": "public",
      "oids": [
        "PDU-MIB::outletVoltage",
        "PDU-MIB::outletCurrent"
      ]
    }
}
curl -X POST \
    -H 'Content-Type: application/json' \
    -d '{"type":"snmp","pollInterval":10000,"node":"54daadd764f1a8f1088fdc42",
        "config":{"host":"10.1.1.3","communityString":"public",
          "oids":["PDU-MIB::outletVoltage","PDU-MIB::outletCurrent"]}}' \
    <server>/api/current/pollers
{
  "node": null,
  "config": {
    "host": "10.1.1.3",
    "communityString": "public",
    "extensionMibs": [
      "PDU-MIB::outletVoltage",
      "PDU-MIB::outletCurrent"
    ]
  },
  "pollInterval": 10000,
  "lastStarted": null,
  "lastFinished": null,
  "failureCount": 0,
  "createdAt": "2015-02-11T20:50:41.663Z",
  "updatedAt": "2015-02-11T20:50:41.663Z",
  "id": "54dbc0a11eaecfc22a30d59b",
  "type": "snmp"
}

Create a New Metric Poller

Metric pollers can be created by adding the name of the metric to the poller config instead of data like “oids” or “command”

POST /api/current/pollers
{
    "type": "snmp",
    "pollInterval": 10000,
    "node": "54daadd764f1a8f1088fdc42",
    "config": {
       "metric": "snmp-interface-bandwidth-utilization"
    }
}
curl -X POST \
    -H 'Content-Type: application/json' \
    -d '{"type":"snmp","pollInterval":10000,"node":"54daadd764f1a8f1088fdc42",
        "config":{"metric":"snmp-interface-bandwidth-poller"}}' \
    <server>/api/current/pollers

Get a Poller’s Data Stream

GET /api/current/pollers/:id/data
curl <server>/api/current/pollers/<pollerid>/data

Sample Output: IPMI

[
  {
    "user": "admin",
    "password": "admin",
    "host": "10.1.1.2",
    "timestamp": "Wed Feb 11 2015 12:29:26 GMT-0800 (PST)",
    "sdr": [ 
        { "Lower critical": "0.000",
          "Upper critical": "87.000",
          "Sensor Id": "CPU1 Temp",
          "Normal Maximum": "89.000",
          "Lower non-critical": "0.000",
          "Status": "ok",
          "Entry Id Name": "Processor",
          "Upper non-critical": "84.000",
          "Sensor Type": "Temperature",
          "Entity Id": "3.1",
          "Nominal Reading": "45.000",
          "Sensor Reading": "31",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "-4.000" },
        { "Lower critical": "0.000",
          "Upper critical": "87.000",
          "Sensor Id": "CPU2 Temp",
          "Normal Maximum": "89.000",
          "Lower non-critical": "0.000",
          "Status": "ok",
          "Entry Id Name": "Processor",
          "Upper non-critical": "84.000",
          "Sensor Type": "Temperature",
          "Entity Id": "3.2",
          "Nominal Reading": "45.000",
          "Sensor Reading": "25",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "-4.000" },
        { "Lower critical": "-7.000",
          "Upper critical": "85.000",
          "Sensor Id": "System Temp",
          "Normal Maximum": "74.000",
          "Lower non-critical": "-5.000",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "7.1",
          "Nominal Reading": "45.000",
          "Sensor Reading": "30",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "-4.000" },
        { "Lower critical": "-7.000",
          "Upper critical": "85.000",
          "Sensor Id": "Peripheral Temp",
          "Normal Maximum": "74.000",
          "Lower non-critical": "-5.000",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "7.2",
          "Nominal Reading": "45.000",
          "Sensor Reading": "41",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "-4.000" },
        { "Lower critical": "-8.000",
          "Upper critical": "95.000",
          "Sensor Id": "PCH Temp",
          "Normal Maximum": "67.000",
          "Lower non-critical": "-5.000",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "90.000",
          "Sensor Type": "Temperature",
          "Entity Id": "7.3",
          "Nominal Reading": "45.000",
          "Sensor Reading": "50",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "-4.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P1-DIMMA1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.64",
          "Nominal Reading": "225.000",
          "Sensor Reading": "37",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P1-DIMMB1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.65",
          "Nominal Reading": "225.000",
          "Sensor Reading": "37",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P1-DIMMC1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.68",
          "Nominal Reading": "225.000",
          "Sensor Reading": "38",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P1-DIMMD1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.69",
          "Nominal Reading": "225.000",
          "Sensor Reading": "38",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P2-DIMME1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.72",
          "Nominal Reading": "225.000",
          "Sensor Reading": "34",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P2-DIMMF1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.73",
          "Nominal Reading": "225.000",
          "Sensor Reading": "33",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P2-DIMMG1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.76",
          "Nominal Reading": "225.000",
          "Sensor Reading": "34",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "2.000",
          "Upper critical": "85.000",
          "Sensor Id": "P2-DIMMH1 TEMP",
          "Normal Maximum": "206.000",
          "Lower non-critical": "4.000",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "80.000",
          "Sensor Type": "Temperature",
          "Entity Id": "32.77",
          "Nominal Reading": "225.000",
          "Sensor Reading": "34",
          "Sensor Reading Units": "degrees C",
          "Normal Minimum": "168.000" },
        { "Lower critical": "450.000",
          "Upper critical": "19050.000",
          "Sensor Id": "FAN1",
          "Normal Maximum": "12750.000",
          "Lower non-critical": "600.000",
          "Status": "ok",
          "Entry Id Name": "Fan Device",
          "Upper non-critical": "18975.000",
          "Sensor Type": "Fan",
          "Entity Id": "29.1",
          "Nominal Reading": "9600.000",
          "Sensor Reading": "4050",
          "Sensor Reading Units": "RPM",
          "Normal Minimum": "1500.000" },
        { "Lower critical": "450.000",
          "Upper critical": "19050.000",
          "Sensor Id": "FAN2",
          "Normal Maximum": "12750.000",
          "Lower non-critical": "600.000",
          "Status": "ok",
          "Entry Id Name": "Fan Device",
          "Upper non-critical": "18975.000",
          "Sensor Type": "Fan",
          "Entity Id": "29.2",
          "Nominal Reading": "9600.000",
          "Sensor Reading": "3975",
          "Sensor Reading Units": "RPM",
          "Normal Minimum": "1500.000" },
        { "Lower critical": "0.864",
          "Upper critical": "1.392",
          "Sensor Id": "VTT",
          "Normal Maximum": "1.648",
          "Lower non-critical": "0.912",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "1.344",
          "Sensor Type": "Voltage",
          "Entity Id": "7.10",
          "Nominal Reading": "1.488",
          "Sensor Reading": "1.008",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "1.344" },
        { "Lower critical": "0.512",
          "Upper critical": "1.520",
          "Sensor Id": "CPU1 Vcore",
          "Normal Maximum": "2.688",
          "Lower non-critical": "0.544",
          "Status": "ok",
          "Entry Id Name": "Processor",
          "Upper non-critical": "1.488",
          "Sensor Type": "Voltage",
          "Entity Id": "3.3",
          "Nominal Reading": "2.048",
          "Sensor Reading": "0.672",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "1.600" },
        { "Lower critical": "0.512",
          "Upper critical": "1.520",
          "Sensor Id": "CPU2 Vcore",
          "Normal Maximum": "2.688",
          "Lower non-critical": "0.544",
          "Status": "ok",
          "Entry Id Name": "Processor",
          "Upper non-critical": "1.488",
          "Sensor Type": "Voltage",
          "Entity Id": "3.4",
          "Nominal Reading": "2.048",
          "Sensor Reading": "0.688",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "1.664" },
        { "Lower critical": "1.152",
          "Upper critical": "1.696",
          "Sensor Id": "VDIMM ABCD",
          "Normal Maximum": "3.488",
          "Lower non-critical": "1.200",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "1.648",
          "Sensor Type": "Voltage",
          "Entity Id": "32.1",
          "Nominal Reading": "3.072",
          "Sensor Reading": "1.360",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "2.592" },
        { "Lower critical": "1.152",
          "Upper critical": "1.696",
          "Sensor Id": "VDIMM EFGH",
          "Normal Maximum": "3.488",
          "Lower non-critical": "1.200",
          "Status": "ok",
          "Entry Id Name": "Memory Device",
          "Upper non-critical": "1.648",
          "Sensor Type": "Voltage",
          "Entity Id": "32.2",
          "Nominal Reading": "3.072",
          "Sensor Reading": "1.344",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "2.592" },
        { "Lower critical": "0.928",
          "Upper critical": "1.264",
          "Sensor Id": "+1.1 V",
          "Normal Maximum": "2.416",
          "Lower non-critical": "0.976",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "1.216",
          "Sensor Type": "Voltage",
          "Entity Id": "7.11",
          "Nominal Reading": "2.192",
          "Sensor Reading": "1.104",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "1.968" },
        { "Lower critical": "1.296",
          "Upper critical": "1.696",
          "Sensor Id": "+1.5 V",
          "Normal Maximum": "3.312",
          "Lower non-critical": "1.344",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "1.648",
          "Sensor Type": "Voltage",
          "Entity Id": "7.12",
          "Nominal Reading": "3.072",
          "Sensor Reading": "1.488",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "2.704" },
        { "Lower critical": "2.784",
          "Upper critical": "3.792",
          "Sensor Id": "3.3V",
          "Normal Maximum": "10.656",
          "Lower non-critical": "2.928",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "3.648",
          "Sensor Type": "Voltage",
          "Entity Id": "7.13",
          "Nominal Reading": "9.216",
          "Sensor Reading": "3.264",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "8.928" },
        { "Lower critical": "2.784",
          "Upper critical": "3.792",
          "Sensor Id": "+3.3VSB",
          "Normal Maximum": "7.296",
          "Lower non-critical": "2.928",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "3.648",
          "Sensor Type": "Voltage",
          "Entity Id": "7.14",
          "Nominal Reading": "6.624",
          "Sensor Reading": "3.312",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "5.952" },
        { "Lower critical": "4.288",
          "Upper critical": "5.696",
          "Sensor Id": "5V",
          "Normal Maximum": "10.560",
          "Lower non-critical": "4.480",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "5.504",
          "Sensor Type": "Voltage",
          "Entity Id": "7.15",
          "Nominal Reading": "10.112",
          "Sensor Reading": "4.928",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "9.280" },
        { "Lower critical": "4.288",
          "Upper critical": "5.696",
          "Sensor Id": "+5VSB",
          "Normal Maximum": "11.008",
          "Lower non-critical": "4.480",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "5.504",
          "Sensor Type": "Voltage",
          "Entity Id": "7.16",
          "Nominal Reading": "10.112",
          "Sensor Reading": "4.992",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "9.024" },
        { "Lower critical": "10.494",
          "Upper critical": "13.568",
          "Sensor Id": "12V",
          "Normal Maximum": "25.970",
          "Lower non-critical": "10.812",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "13.250",
          "Sensor Type": "Voltage",
          "Entity Id": "7.17",
          "Nominal Reading": "24.168",
          "Sensor Reading": "11.872",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "21.624" },
        { "Lower critical": "2.544",
          "Upper critical": "3.456",
          "Sensor Id": "VBAT",
          "Normal Maximum": "11.424",
          "Lower non-critical": "2.688",
          "Status": "ok",
          "Entry Id Name": "System Board",
          "Upper non-critical": "3.312",
          "Sensor Type": "Voltage",
          "Entity Id": "7.18",
          "Nominal Reading": "9.216",
          "Sensor Reading": "3.168",
          "Sensor Reading Units": "Volts",
          "Normal Minimum": "8.928" },
        { "Sensor Id": "PS1 Status",
          "Status": "ok",
          "States Asserted": "Presence detected",
          "Entity Id": "10.1" },
        { "Sensor Id": "PS2 Status",
          "Status": "ok",
          "States Asserted": "Presence detected",
          "Entity Id": "10.2" } 
        ]
    }
]

Sample Output: SNMP

[
  {
    "host": "10.1.1.3",
    "communityString": "public",
    "extensionMibs": [
      "PDU-MIB::outletVoltage",
      "PDU-MIB::outletCurrent"
    ],
    "mibs": [
      [
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-1"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-2"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-3"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-4"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-5"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-6"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-7"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-8"
        }
      ],
      [
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-1"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-2"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-3"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-4"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-5"
        },
        {
          "value": 737,
          "name": "PDU-MIB::outletCurrent-6"
        },
        {
          "value": 1538,
          "name": "PDU-MIB::outletCurrent-7"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-8"
        }
      ]
    ],
    "timestamp": "Wed Feb 11 2015 13:08:19 GMT-0800 (PST)"
  },
  {
    "host": "10.1.1.3",
    "communityString": "public",
    "extensionMibs": [
      "PDU-MIB::outletVoltage",
      "PDU-MIB::outletCurrent"
    ],
    "mibs": [
      [
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-1"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-2"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-3"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-4"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-5"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-6"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-7"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-8"
        }
      ],
      [
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-1"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-2"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-3"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-4"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-5"
        },
        {
          "value": 737,
          "name": "PDU-MIB::outletCurrent-6"
        },
        {
          "value": 1577,
          "name": "PDU-MIB::outletCurrent-7"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-8"
        }
      ]
    ],
    "timestamp": "Wed Feb 11 2015 13:08:25 GMT-0800 (PST)"
  },
  {
    "host": "10.1.1.3",
    "communityString": "public",
    "extensionMibs": [
      "PDU-MIB::outletVoltage",
      "PDU-MIB::outletCurrent"
    ],
    "mibs": [
      [
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-1"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-2"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-3"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-4"
        },
        {
          "value": 116000,
          "name": "PDU-MIB::outletVoltage-5"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-6"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-7"
        },
        {
          "value": 117000,
          "name": "PDU-MIB::outletVoltage-8"
        }
      ],
      [
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-1"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-2"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-3"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-4"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-5"
        },
        {
          "value": 756,
          "name": "PDU-MIB::outletCurrent-6"
        },
        {
          "value": 1538,
          "name": "PDU-MIB::outletCurrent-7"
        },
        {
          "value": 0,
          "name": "PDU-MIB::outletCurrent-8"
        }
      ]
    ],
    "timestamp": "Wed Feb 11 2015 13:08:30 GMT-0800 (PST)"
  }
]

Get List of Active Pollers

GET /api/current/pollers
curl <server>/api/current/pollers

Get Definition for a Single Poller

GET /api/current/pollers/:id
curl <server>/api/current/pollers/<pollerid>

Update a Single Poller to change the interval

PATCH /api/current/pollers/:id
{
    "pollInterval": 15000
}
curl -X PATCH \
    -H 'Content-Type: application/json' \
    -d '{"pollInterval":15000}' \
    <server>/api/current/pollers/<pollerid>

Update a Single Poller to pause the poller

PATCH /api/current/pollers/:id
{
    "paused": true
}
curl -X PATCH \
    -H 'Content-Type: application/json' \
    -d '{"paused":true}' \
    <server>/api/current/pollers/<pollerid>

Delete a Single Poller

DELETE /api/current/pollers/:id
curl -X DELETE <server>/api/current/pollers/<pollerid>

Get List of Active Pollers Associated With a Node

GET /api/current/nodes/:id/pollers
curl <server>/api/current/nodes/<nodeid>/pollers

6.26.5. IPMI Poller Alerts

Please see Event Notification for more poller alert events information.

Sample data for a “sel” alert:

{
    "type":"polleralert",
    "action":"sel.updated",
    "typeId":"588586022116386a0d1e860f",
    "nodeId":"588585bee0f66f700da40335",
    "severity":"warning",
    "data":{
        "user":"admin",
        "host":"172.31.128.13",
        "alert":{
            "matches":[
                {
                    "Event Type Code":"07",
                    "Event Data":"/010000|040000/"
                }
            ],
            "reading":{
                "SEL Record ID":"0102",
                "Record Type":"02",
                "Timestamp":"01/01/1970 03:09:50",
                "Generator ID":"0001",
                "EvM Revision":"04",
                "Sensor Type":"Physical Security",
                "Sensor Number":"02",
                "Event Type":"Generic Discrete",
                "Event Direction":"Assertion Event",
                "Event Data":"010000",
                "Description":"Transition to Non-critical from OK",
                "Event Type Code":"07",
                "Sensor Type Code":"05"
            }
        }
    },
    "version":"1.0",
    "createdAt":"2017-01-23T07:36:53.092Z"
}

Sample data for an “sdr” alert:

{
    "type":"polleralert",
    "action":"sdr.updated",
    "typeId":"588586022116386a0d1e8610",
    "nodeId":"588585bee0f66f700da40335",
    "severity":"information",
    "data":{
        "host":"172.31.128.13",
        "user":"admin",
        "inCondition":true,
        "reading":{
            "sensorId":"Fan_SSD1 (0xfd)",
            "entityId":"29.1",
            "entryIdName":"Fan Device",
            "sdrType":"Threshold",
            "sensorType":"Fan",
            "sensorReading":"0",
            "sensorReadingUnits":"% RPM",
            "nominalReading":"",
            "normalMinimum":"",
            "normalMaximum":"",
            "statesAsserted":[],
            "status":"LowerCritical",
            "lowerCritical":"500.000",
            "lowerNonCritical":"1000.000",
            "positiveHysteresis":"Unspecified",
            "negativeHysteresis":"Unspecified",
            "minimumSensorRange":"Unspecified",
            "maximumSensorRange":"Unspecified",
            "eventMessageControl":"Per-threshold",
            "readableThresholds":"lcr lnc",
            "settableThresholds":"lcr lnc",
            "thresholdReadMask":"lcr lnc",
            "assertionsEnabled":["lnc- lcr-"],
            "deassertionsEnabled":["lnc- lcr-"]
        }
    },
    "version":"1.0",
    "createdAt":"2017-01-23T07:36:56.179Z"
}

Sample data for an “snmp” alert:

{
    "type":"polleralert",
    "action":"snmp.updated",
    "typeId":"588586022116386a0d1e8611",
    "nodeId":"588585bee0f66f700da40335",
    "severity":"information",
    "data":{
        "states":{
            "last":"ON",
            "current":"OFF"
        }
    },
    data: {
        host: '10.1.1.3',
        oid: '.1.3.6.1.2.1.1.5.0',
        value: 'APC Rack Mounted UPS'
        matched: '/Mounted/'
    }
    "version":"1.0",
    "createdAt":"2017-01-23T08:20:32.231Z"
}

Sample data for an “snmp” metric alert:

{
    "type":"polleralert",
    "action":"snmp.updated",
    "typeId":"588586022116386a0d1e8611",
    "nodeId":"588585bee0f66f700da40335",
    "severity":"information",
    "data":{
        "states":{
            "last":"ON",
            "current":"OFF"
        }
    },
    data: {
        host: '127.0.0.1',
        oid: '.1.3.6.1.4.1.9.9.117.1.1.2.1.2.470',
        value: 'No Such Instance currently exists at this OID',
        matched: { contains: 'No Such Instance' },
        severity: 'warning',
        description: 'PSU element is not present',
        metric: 'snmp-switch-sensor-status'
    }
    "version":"1.0",
    "createdAt":"2017-01-23T08:20:32.231Z"
}

Creating Alerts

Alerting for sdr pollers is automatic and triggered when a threshold sensor has a value that does not equal either “ok” or “Not available”. In the example sdr alert above, the value being alerted is “nr”, for Non-recoverable.

Alerts for sel poller data are more flexible and can be user-defined via string or regex matching. The data structure for an sdr result has five keys: ‘date’, ‘time’, ‘sensor’, ‘event’ and ‘value’. Alert data can be specified via a JSON object that maps these keys to either exactly matched or regex matched values:

[
    {
        "sensor": "/Power Unit\s.*$/",
        "event": "Fully Redundant"
    }
]

In order for a value string to be interpreted as a regex pattern, it must begin and end with the ‘/’ character. Additionally, any regex escapes (e.g. n or s) must be double escaped before being serialized and sent over the wire (e.g. n becomes \n). In most programming languages, the equivalent of <RegexObject>.toString() will handle this serialization.

To add an alert to a poller, the above JSON schema must be added to the poller under config.alerts:

{
    "type": "ipmi",
    "pollInterval": 10000,
    "node": "54daadd764f1a8f1088fdc42",
    "config": {
        "command": "sel",
        "alerts": [
            {
                "sensor": "/Power Unit\s.*$/",
                "event": "Fully Redundant"
            },
            {
                "time": "/[0-3][0-3]:.*/",
                "sensor": "/Session Audit\\s.*$/",
                "value": "Asserted"
            }
        ]
    }
}

Snmp poller alerts can be defined just like sel alerts via string or regex matching. However, the keys for an snmp alert must be a string or regex whose value you wish to check against the given OID numeric or string representation:

{
    "type":"snmp",
    "pollInterval":10000,
    "node": "560ac7f33ab91d99448fb945",
     "config": {
      "alerts": [
          {
              ".1.3.6.1.2.1.1.5":"/Mounted/",
              ".1.3.6.1.2.1.1.1":"/ZA11/"
          }
        ],
      "oids": [
        ".1.3.6.1.2.1.1.1",
        ".1.3.6.1.2.1.1.5"
      ]
    }
}

Complex alerts are done by replacing the string/regex value with a validation object. The following example will match all OIDs with ‘InErrors’ in the name and generate an alert when the value is greater than 0.

{
    "type":"snmp",
    "pollInterval":10000,
    "node": "560ac7f33ab91d99448fb945",
    "config": {
        "alerts": [
            {
                "/\\S*InErrors/": {
                    "greaterThan": 0,
                    "integer": true,
                    "severity": "ignore"
                }
            }
         ],
        "metric": "snmp-txrx-counters"
    }
}

6.26.6. Chassis Power State Alert

The IPMI chassis poller will publish an alert message when the power state of the node transitions. The AMQP message payload will contain both the current and last power state, a reference location to the node resource and a reference location to the pollers current data cache.

  • Example message:
{
    "type":"polleralert",
    "action":"chassispower.updated",
    "typeId":"588586022116386a0d1e8611",
    "nodeId":"588585bee0f66f700da40335",
    "severity":"information",
    "data":{
        "states":{
            "last":"ON",
            "current":"OFF"
        }
    },
    "version":"1.0",
    "createdAt":"2017-01-23T08:20:32.231Z"
}

6.26.7. Poller JSON Format

Pollers are defined via JSON with these required fields:

Name Type Flags Description
type String required Poller type. Valid values: ipmi, snmp
pollInterval Number required Time in milliseconds to wait between polls.

The following fields are only valid for IPMI pollers:

Name Type Flags Description
config Object required Hash of configuration parameters.
config.command String required IPMI command to run. Valid values: power, sel, sdr
config.host String optional IP/Hostname of the node’s BMC.
config.user String optional IPMI username.
config.password String optional IPMI password.
config.metric String optional Run a metric poller instead of a simple IPMI query. Use instead of config.command.
node String optional Node ID to associate this poller with dynamically look up IPMI settings.

The following fields are only valid for SNMP pollers:

Name Type Flags Description
config Object required Hash of configuration parameters.
config.host String optional IP/Hostname of the node’s BMC.
config.community String optional SNMP community string.
config.oids String[] optional Array of OIDs to poll.
config.metric String optional Run a metric poller instead of a simple OID query. Use instead of config.oids.
node String optional Node ID to associate this poller with dynamically look up SNMP settings.

The following fields can be PATCH’ed to change poller behavior:

Name Type Description
pollInterval Number Time in milliseconds to wait between polls.
paused Boolean Determines if the poller can be scheduled. Setting ‘paused’ to true will cause the poller to no longer be run when pollInterval expires