librenms/tests/data/istars.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1630 lines
67 KiB
JSON
Raw Normal View History

{
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.40614",
"sysDescr": "iStars_SWV4.25",
"sysContact": "<private>",
Convert OS discovery to new style (#12099) * terra * airos * port cisco os polling old wwan polling was broken and deprecated anyway * enterasys * Brother, a few changes * AW Plus * Fabos * set expected test data * 3com * Adva FSP150 * advantech * airos-af * aix * akcp * allied * allworx and missed mibs * anyos * fixup some zyxel shared stuffs zywall graph polling * aos * apc * apex * apsoluteos * fix copyrights * arris * arris * aruba-instant * ArubaOS * Ascom * asuswrt-merlin, ats * audiocodes * avocent * avtech * barracuda * binox * boss * canonprinter * cdata * ceraos * ciena-waveserver * fix 3com * fix airos * fix brother yaml? * fix aos more * fix and improve apc * fix arista test data * yaml discovery (basic) * cimc * mib not used * remove old discovery file * ciscosat * ciscosb fixes + improvements * comware * ctm * cumulus * cxr-ts * cyberoam-utm * cyberpower * dahua-nvr * dasan-nos * datadomain * dcn-software and fallback oids * dd-wrt * dell-laser * d* * e* and location * forti, post processing, oid coalescing * Freebsd array of sysDescr regex * finish f* * g* * h* * i* WIP * i* * Junos * j* * k* * unix refactor previous to yaml more inject $device * fixes * fixes * l* * m* * n* ability to set other fields in regex tnmsne polling to eloquent * o* * p* * q* + bonus calix * r* * s* WIP * s* * t* * u* * v* rework vrp to yaml (hybrid) * w* * x* * z* * a* easy no-data * fixes * style fixes * missed ApexPlus * fix signature * Add missing location data * rename getDevice functions * add new cisco ftd data * update docs * revert sill snmp format * fix snmp options * update for new smartax test data * rebase dsm * fix voss
2020-09-18 13:12:07 +00:00
"version": "iStars_SWV4.25 R1.1.1",
"hardware": null,
"features": null,
"location": "<private>",
"os": "istars",
"type": "power",
"serial": null,
"icon": "istars.png"
}
]
},
"poller": "matches discovery"
},
"ports": {
"discovery": {
"ports": [
{
"port_descr_type": null,
"port_descr_descr": null,
"port_descr_circuit": null,
"port_descr_speed": null,
"port_descr_notes": null,
"ifDescr": "lo",
"ifName": "lo",
"portName": null,
"ifIndex": 1,
"ifSpeed": null,
"ifSpeed_prev": null,
"ifConnectorPresent": null,
"ifPromiscuousMode": null,
"ifOperStatus": "up",
"ifOperStatus_prev": null,
"ifAdminStatus": null,
"ifAdminStatus_prev": null,
"ifDuplex": null,
"ifMtu": null,
"ifType": "softwareLoopback",
"ifAlias": "lo",
"ifPhysAddress": null,
"ifHardType": null,
"ifLastChange": 0,
"ifVlan": "",
"ifTrunk": null,
"counter_in": null,
"counter_out": null,
"ignore": 0,
"disabled": 0,
"detailed": 0,
"deleted": 0,
"pagpOperationMode": null,
"pagpPortState": null,
"pagpPartnerDeviceId": null,
"pagpPartnerLearnMethod": null,
"pagpPartnerIfIndex": null,
"pagpPartnerGroupIfIndex": null,
"pagpPartnerDeviceName": null,
"pagpEthcOperationMode": null,
"pagpDeviceId": null,
"pagpGroupIfIndex": null,
"ifInUcastPkts": null,
"ifInUcastPkts_prev": null,
"ifInUcastPkts_delta": null,
"ifInUcastPkts_rate": null,
"ifOutUcastPkts": null,
"ifOutUcastPkts_prev": null,
"ifOutUcastPkts_delta": null,
"ifOutUcastPkts_rate": null,
"ifInErrors": null,
"ifInErrors_prev": null,
"ifInErrors_delta": null,
"ifInErrors_rate": null,
"ifOutErrors": null,
"ifOutErrors_prev": null,
"ifOutErrors_delta": null,
"ifOutErrors_rate": null,
"ifInOctets": null,
"ifInOctets_prev": null,
"ifInOctets_delta": null,
"ifInOctets_rate": null,
"ifOutOctets": null,
"ifOutOctets_prev": null,
"ifOutOctets_delta": null,
"ifOutOctets_rate": null,
"poll_prev": null,
"ifInNUcastPkts": null,
"ifInNUcastPkts_prev": null,
"ifInNUcastPkts_delta": null,
"ifInNUcastPkts_rate": null,
"ifOutNUcastPkts": null,
"ifOutNUcastPkts_prev": null,
"ifOutNUcastPkts_delta": null,
"ifOutNUcastPkts_rate": null,
"ifInDiscards": null,
"ifInDiscards_prev": null,
"ifInDiscards_delta": null,
"ifInDiscards_rate": null,
"ifOutDiscards": null,
"ifOutDiscards_prev": null,
"ifOutDiscards_delta": null,
"ifOutDiscards_rate": null,
"ifInUnknownProtos": null,
"ifInUnknownProtos_prev": null,
"ifInUnknownProtos_delta": null,
"ifInUnknownProtos_rate": null,
"ifInBroadcastPkts": null,
"ifInBroadcastPkts_prev": null,
"ifInBroadcastPkts_delta": null,
"ifInBroadcastPkts_rate": null,
"ifOutBroadcastPkts": null,
"ifOutBroadcastPkts_prev": null,
"ifOutBroadcastPkts_delta": null,
"ifOutBroadcastPkts_rate": null,
"ifInMulticastPkts": null,
"ifInMulticastPkts_prev": null,
"ifInMulticastPkts_delta": null,
"ifInMulticastPkts_rate": null,
"ifOutMulticastPkts": null,
"ifOutMulticastPkts_prev": null,
"ifOutMulticastPkts_delta": null,
"ifOutMulticastPkts_rate": null
},
{
"port_descr_type": null,
"port_descr_descr": null,
"port_descr_circuit": null,
"port_descr_speed": null,
"port_descr_notes": null,
"ifDescr": "eth0",
"ifName": "eth0",
"portName": null,
"ifIndex": 2,
"ifSpeed": null,
"ifSpeed_prev": null,
"ifConnectorPresent": null,
"ifPromiscuousMode": null,
"ifOperStatus": "up",
"ifOperStatus_prev": null,
"ifAdminStatus": null,
"ifAdminStatus_prev": null,
"ifDuplex": null,
"ifMtu": null,
"ifType": "ethernetCsmacd",
"ifAlias": "eth0",
"ifPhysAddress": null,
"ifHardType": null,
"ifLastChange": 0,
"ifVlan": "",
"ifTrunk": null,
"counter_in": null,
"counter_out": null,
"ignore": 0,
"disabled": 0,
"detailed": 0,
"deleted": 0,
"pagpOperationMode": null,
"pagpPortState": null,
"pagpPartnerDeviceId": null,
"pagpPartnerLearnMethod": null,
"pagpPartnerIfIndex": null,
"pagpPartnerGroupIfIndex": null,
"pagpPartnerDeviceName": null,
"pagpEthcOperationMode": null,
"pagpDeviceId": null,
"pagpGroupIfIndex": null,
"ifInUcastPkts": null,
"ifInUcastPkts_prev": null,
"ifInUcastPkts_delta": null,
"ifInUcastPkts_rate": null,
"ifOutUcastPkts": null,
"ifOutUcastPkts_prev": null,
"ifOutUcastPkts_delta": null,
"ifOutUcastPkts_rate": null,
"ifInErrors": null,
"ifInErrors_prev": null,
"ifInErrors_delta": null,
"ifInErrors_rate": null,
"ifOutErrors": null,
"ifOutErrors_prev": null,
"ifOutErrors_delta": null,
"ifOutErrors_rate": null,
"ifInOctets": null,
"ifInOctets_prev": null,
"ifInOctets_delta": null,
"ifInOctets_rate": null,
"ifOutOctets": null,
"ifOutOctets_prev": null,
"ifOutOctets_delta": null,
"ifOutOctets_rate": null,
"poll_prev": null,
"ifInNUcastPkts": null,
"ifInNUcastPkts_prev": null,
"ifInNUcastPkts_delta": null,
"ifInNUcastPkts_rate": null,
"ifOutNUcastPkts": null,
"ifOutNUcastPkts_prev": null,
"ifOutNUcastPkts_delta": null,
"ifOutNUcastPkts_rate": null,
"ifInDiscards": null,
"ifInDiscards_prev": null,
"ifInDiscards_delta": null,
"ifInDiscards_rate": null,
"ifOutDiscards": null,
"ifOutDiscards_prev": null,
"ifOutDiscards_delta": null,
"ifOutDiscards_rate": null,
"ifInUnknownProtos": null,
"ifInUnknownProtos_prev": null,
"ifInUnknownProtos_delta": null,
"ifInUnknownProtos_rate": null,
"ifInBroadcastPkts": null,
"ifInBroadcastPkts_prev": null,
"ifInBroadcastPkts_delta": null,
"ifInBroadcastPkts_rate": null,
"ifOutBroadcastPkts": null,
"ifOutBroadcastPkts_prev": null,
"ifOutBroadcastPkts_delta": null,
"ifOutBroadcastPkts_rate": null,
"ifInMulticastPkts": null,
"ifInMulticastPkts_prev": null,
"ifInMulticastPkts_delta": null,
"ifInMulticastPkts_rate": null,
"ifOutMulticastPkts": null,
"ifOutMulticastPkts_prev": null,
"ifOutMulticastPkts_delta": null,
"ifOutMulticastPkts_rate": null
}
]
},
"poller": {
"ports": [
{
"port_descr_type": null,
"port_descr_descr": null,
"port_descr_circuit": null,
"port_descr_speed": null,
"port_descr_notes": null,
"ifDescr": "lo",
"ifName": "lo",
"portName": null,
"ifIndex": 1,
"ifSpeed": 10000000,
"ifSpeed_prev": null,
"ifConnectorPresent": null,
"ifPromiscuousMode": null,
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
"ifAdminStatus": "up",
"ifAdminStatus_prev": null,
"ifDuplex": null,
"ifMtu": 16436,
"ifType": "softwareLoopback",
"ifAlias": "lo",
"ifPhysAddress": null,
"ifHardType": null,
"ifLastChange": 0,
"ifVlan": "",
"ifTrunk": null,
"counter_in": null,
"counter_out": null,
"ignore": 0,
"disabled": 0,
"detailed": 0,
"deleted": 0,
"pagpOperationMode": null,
"pagpPortState": null,
"pagpPartnerDeviceId": null,
"pagpPartnerLearnMethod": null,
"pagpPartnerIfIndex": null,
"pagpPartnerGroupIfIndex": null,
"pagpPartnerDeviceName": null,
"pagpEthcOperationMode": null,
"pagpDeviceId": null,
"pagpGroupIfIndex": null,
"ifInUcastPkts": 7,
"ifInUcastPkts_prev": 0,
"ifInUcastPkts_delta": null,
"ifInUcastPkts_rate": null,
"ifOutUcastPkts": 7,
"ifOutUcastPkts_prev": 0,
"ifOutUcastPkts_delta": null,
"ifOutUcastPkts_rate": null,
"ifInErrors": 0,
"ifInErrors_prev": 0,
"ifInErrors_delta": null,
"ifInErrors_rate": null,
"ifOutErrors": 0,
"ifOutErrors_prev": 0,
"ifOutErrors_delta": null,
"ifOutErrors_rate": null,
"ifInOctets": 1061,
"ifInOctets_prev": 0,
"ifInOctets_delta": null,
"ifInOctets_rate": null,
"ifOutOctets": 1061,
"ifOutOctets_prev": 0,
"ifOutOctets_delta": null,
"ifOutOctets_rate": null,
"poll_prev": null,
"ifInNUcastPkts": 0,
"ifInNUcastPkts_prev": 0,
"ifInNUcastPkts_delta": null,
"ifInNUcastPkts_rate": null,
"ifOutNUcastPkts": 0,
"ifOutNUcastPkts_prev": 0,
"ifOutNUcastPkts_delta": null,
"ifOutNUcastPkts_rate": null,
"ifInDiscards": 0,
"ifInDiscards_prev": 0,
"ifInDiscards_delta": null,
"ifInDiscards_rate": null,
"ifOutDiscards": 0,
"ifOutDiscards_prev": 0,
"ifOutDiscards_delta": null,
"ifOutDiscards_rate": null,
"ifInUnknownProtos": 0,
"ifInUnknownProtos_prev": 0,
"ifInUnknownProtos_delta": null,
"ifInUnknownProtos_rate": null,
"ifInBroadcastPkts": 0,
"ifInBroadcastPkts_prev": 0,
"ifInBroadcastPkts_delta": null,
"ifInBroadcastPkts_rate": null,
"ifOutBroadcastPkts": 0,
"ifOutBroadcastPkts_prev": 0,
"ifOutBroadcastPkts_delta": null,
"ifOutBroadcastPkts_rate": null,
"ifInMulticastPkts": 0,
"ifInMulticastPkts_prev": 0,
"ifInMulticastPkts_delta": null,
"ifInMulticastPkts_rate": null,
"ifOutMulticastPkts": 0,
"ifOutMulticastPkts_prev": 0,
"ifOutMulticastPkts_delta": null,
"ifOutMulticastPkts_rate": null
},
{
"port_descr_type": null,
"port_descr_descr": null,
"port_descr_circuit": null,
"port_descr_speed": null,
"port_descr_notes": null,
"ifDescr": "eth0",
"ifName": "eth0",
"portName": null,
"ifIndex": 2,
"ifSpeed": 10000000,
"ifSpeed_prev": null,
"ifConnectorPresent": null,
"ifPromiscuousMode": null,
"ifOperStatus": "up",
"ifOperStatus_prev": "up",
"ifAdminStatus": "up",
"ifAdminStatus_prev": null,
"ifDuplex": null,
"ifMtu": 1500,
"ifType": "ethernetCsmacd",
"ifAlias": "eth0",
"ifPhysAddress": "308999014f79",
"ifHardType": null,
"ifLastChange": 0,
"ifVlan": "",
"ifTrunk": null,
"counter_in": null,
"counter_out": null,
"ignore": 0,
"disabled": 0,
"detailed": 0,
"deleted": 0,
"pagpOperationMode": null,
"pagpPortState": null,
"pagpPartnerDeviceId": null,
"pagpPartnerLearnMethod": null,
"pagpPartnerIfIndex": null,
"pagpPartnerGroupIfIndex": null,
"pagpPartnerDeviceName": null,
"pagpEthcOperationMode": null,
"pagpDeviceId": null,
"pagpGroupIfIndex": null,
"ifInUcastPkts": 4998166,
"ifInUcastPkts_prev": 0,
"ifInUcastPkts_delta": null,
"ifInUcastPkts_rate": null,
"ifOutUcastPkts": 301939,
"ifOutUcastPkts_prev": 0,
"ifOutUcastPkts_delta": null,
"ifOutUcastPkts_rate": null,
"ifInErrors": 0,
"ifInErrors_prev": 0,
"ifInErrors_delta": null,
"ifInErrors_rate": null,
"ifOutErrors": 0,
"ifOutErrors_prev": 0,
"ifOutErrors_delta": null,
"ifOutErrors_rate": null,
"ifInOctets": 719266498,
"ifInOctets_prev": 0,
"ifInOctets_delta": null,
"ifInOctets_rate": null,
"ifOutOctets": 41888583,
"ifOutOctets_prev": 0,
"ifOutOctets_delta": null,
"ifOutOctets_rate": null,
"poll_prev": null,
"ifInNUcastPkts": 0,
"ifInNUcastPkts_prev": 0,
"ifInNUcastPkts_delta": null,
"ifInNUcastPkts_rate": null,
"ifOutNUcastPkts": 0,
"ifOutNUcastPkts_prev": 0,
"ifOutNUcastPkts_delta": null,
"ifOutNUcastPkts_rate": null,
"ifInDiscards": 0,
"ifInDiscards_prev": 0,
"ifInDiscards_delta": null,
"ifInDiscards_rate": null,
"ifOutDiscards": 0,
"ifOutDiscards_prev": 0,
"ifOutDiscards_delta": null,
"ifOutDiscards_rate": null,
"ifInUnknownProtos": 0,
"ifInUnknownProtos_prev": 0,
"ifInUnknownProtos_delta": null,
"ifInUnknownProtos_rate": null,
"ifInBroadcastPkts": 0,
"ifInBroadcastPkts_prev": 0,
"ifInBroadcastPkts_delta": null,
"ifInBroadcastPkts_rate": null,
"ifOutBroadcastPkts": 0,
"ifOutBroadcastPkts_prev": 0,
"ifOutBroadcastPkts_delta": null,
"ifOutBroadcastPkts_rate": null,
"ifInMulticastPkts": 0,
"ifInMulticastPkts_prev": 0,
"ifInMulticastPkts_delta": null,
"ifInMulticastPkts_rate": null,
"ifOutMulticastPkts": 0,
"ifOutMulticastPkts_prev": 0,
"ifOutMulticastPkts_delta": null,
"ifOutMulticastPkts_rate": null
}
]
}
},
"sensors": {
"discovery": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "charge",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.4.0",
"sensor_index": "500",
"sensor_type": "rfc1628",
"sensor_descr": "Battery charge remaining",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 100,
"sensor_limit": 101,
"sensor_limit_warn": null,
"sensor_limit_low": 15,
"sensor_limit_low_warn": 50,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.3.1.0",
"sensor_index": "1",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.4.1.0",
"sensor_index": "101",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.3.1.3.1.0",
"sensor_index": "201",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.6.0",
"sensor_index": "500",
"sensor_type": "rfc1628",
"sensor_descr": "Battery",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.2.1.0",
"sensor_index": "3.2.0.1",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 60,
"sensor_limit": 63,
"sensor_limit_warn": null,
"sensor_limit_low": 57,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.2.0",
"sensor_index": "4.2.0",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 60,
"sensor_limit": 63,
"sensor_limit_warn": null,
"sensor_limit_low": 57,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.1.0",
"sensor_index": "5.1.0",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 60,
"sensor_limit": 63,
"sensor_limit_warn": null,
"sensor_limit_low": 57,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "load",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.5.1.0",
"sensor_index": "501",
"sensor_type": "rfc1628",
"sensor_descr": "Percentage load",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 17,
"sensor_limit": 80,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.5.1.0",
"sensor_index": "101",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.3.1.4.1.0",
"sensor_index": "201",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.4.1.0",
"sensor_index": "301",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.2.0",
"sensor_index": "100",
"sensor_type": "rfc1628",
"sensor_descr": "Time on battery",
"group": null,
"sensor_divisor": 60,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": 2,
"sensor_limit_warn": 1,
"sensor_limit_low": 0,
"sensor_limit_low_warn": 0,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.3.0",
"sensor_index": "200",
"sensor_type": "rfc1628",
"sensor_descr": "Estimated battery time remaining",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 848,
"sensor_limit": 10000,
"sensor_limit_warn": null,
"sensor_limit_low": 5,
"sensor_limit_low_warn": 10,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.1.0",
"sensor_index": "0",
"sensor_type": "upsBatteryStatusState",
"sensor_descr": "Battery Status",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 2,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "0",
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "upsBatteryStatusState"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.1.0",
"sensor_index": "0",
"sensor_type": "upsOutputSourceState",
"sensor_descr": "Output Source",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 3,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "0",
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "upsOutputSourceState"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.7.0",
"sensor_index": "0",
"sensor_type": "rfc1628",
"sensor_descr": "Battery",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 35,
"sensor_limit": 55,
"sensor_limit_warn": null,
"sensor_limit_low": 25,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.2.1.0",
"sensor_index": "1",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 115,
"sensor_limit": 132.25,
"sensor_limit_warn": null,
"sensor_limit_low": 97.75,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.5.0",
"sensor_index": "1.2.5.0",
"sensor_type": "rfc1628",
"sensor_descr": "Battery",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 216.9,
"sensor_limit": 249.435,
"sensor_limit_warn": null,
"sensor_limit_low": 184.365,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.3.1.0",
"sensor_index": "101",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 224,
"sensor_limit": 257.6,
"sensor_limit_warn": null,
"sensor_limit_low": 190.4,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.3.1.2.1",
"sensor_index": "201",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 224,
"sensor_limit": 257.6,
"sensor_limit_warn": null,
"sensor_limit_low": 190.4,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
}
],
"state_indexes": [
{
"state_name": "upsBatteryStatusState",
"state_descr": "Unknown",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "upsBatteryStatusState",
"state_descr": "Normal",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "upsBatteryStatusState",
"state_descr": "Low",
"state_draw_graph": 0,
"state_value": 3,
"state_generic_value": 2
},
{
"state_name": "upsBatteryStatusState",
"state_descr": "Depleted",
"state_draw_graph": 0,
"state_value": 4,
"state_generic_value": 2
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Other",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "upsOutputSourceState",
"state_descr": "None",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 3
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Normal",
"state_draw_graph": 0,
"state_value": 3,
"state_generic_value": 0
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Bypass",
"state_draw_graph": 0,
"state_value": 4,
"state_generic_value": 1
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Battery",
"state_draw_graph": 0,
"state_value": 5,
"state_generic_value": 2
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Booster",
"state_draw_graph": 0,
"state_value": 6,
"state_generic_value": 2
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Reducer",
"state_draw_graph": 0,
"state_value": 7,
"state_generic_value": 2
}
]
},
"poller": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "charge",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.4.0",
"sensor_index": "500",
"sensor_type": "rfc1628",
"sensor_descr": "Battery charge remaining",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 100,
"sensor_limit": 101,
"sensor_limit_warn": null,
"sensor_limit_low": 15,
"sensor_limit_low_warn": 50,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.3.1.0",
"sensor_index": "1",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.4.1.0",
"sensor_index": "101",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.3.1.3.1.0",
"sensor_index": "201",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.6.0",
"sensor_index": "500",
"sensor_type": "rfc1628",
"sensor_descr": "Battery",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.2.1.0",
"sensor_index": "3.2.0.1",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 60,
"sensor_limit": 63,
"sensor_limit_warn": null,
"sensor_limit_low": 57,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.2.0",
"sensor_index": "4.2.0",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 60,
"sensor_limit": 63,
"sensor_limit_warn": null,
"sensor_limit_low": 57,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.1.0",
"sensor_index": "5.1.0",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 60,
"sensor_limit": 63,
"sensor_limit_warn": null,
"sensor_limit_low": 57,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "load",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.5.1.0",
"sensor_index": "501",
"sensor_type": "rfc1628",
"sensor_descr": "Percentage load",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 17,
"sensor_limit": 80,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.5.1.0",
"sensor_index": "101",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.3.1.4.1.0",
"sensor_index": "201",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.4.1.0",
"sensor_index": "301",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
Remove guessed limits for some health sensors, documentation for sensor classes (#10327) * Default to null for group yaml discovery. * Update test data for a154bda yaml group null fix. * Changes to guessed limit functions for sensors. Original behaviour =================== The file `includes/discovery/functions.inc.php` contains `sensor_limit_low()` and `sensor_limit()` which both attempt to guess a sane value for sensors when no explicitly defined low_limit or high_limit can be found during discovery. Both switch control structures used in those two functions have empty case statements which means that if one of those matches, it's going to fall through and run the code for each subsequent case until a `break` is reached. For example, when we call `function sensor_low_limit(dbm, -13.036)` it will return the value `-12.3842` instead of `null`. That is because there will be a match at `case 'dbm':` which falls through all the way to `case 'cooling':`, where it performs `$limit = -13.036 * 0.95` before hitting a `break`. Changed behaviour =================== Removed `power_consumed` and `count` guessed low_limit and high_limit, I personally added those sensor classes in PR #9471 when I didn't understand that a switch control structure has fall-through behaviour so I can guarantee that guessing limits for those is a mistake on my behalf. It should not be there, only power_factor can have guessed limits. Apologies for the issue, I'm still a beginning programmer! Furthermore, I removed guessed high_limit values for `current` and `power` because these are supposed to draw higher values as more devices or components are installed on for example a PDU or a chassis. Finally, I removed guessed low_limit and high_limit for `dbm` sensors, there is a much too large variance in power budget on commercially available optical transceivers for there to be a sensible window where you can guess these values. * Documentation on adding sensor classes. * Update test data - sensor limit changes @ 30212d2
2019-06-21 14:03:27 +00:00
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.2.0",
"sensor_index": "100",
"sensor_type": "rfc1628",
"sensor_descr": "Time on battery",
"group": null,
"sensor_divisor": 60,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": 2,
"sensor_limit_warn": 1,
"sensor_limit_low": 0,
"sensor_limit_low_warn": 0,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.3.0",
"sensor_index": "200",
"sensor_type": "rfc1628",
"sensor_descr": "Estimated battery time remaining",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 848,
"sensor_limit": 10000,
"sensor_limit_warn": null,
"sensor_limit_low": 5,
"sensor_limit_low_warn": 10,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.1.0",
"sensor_index": "0",
"sensor_type": "upsBatteryStatusState",
"sensor_descr": "Battery Status",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 2,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "0",
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "upsBatteryStatusState"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.1.0",
"sensor_index": "0",
"sensor_type": "upsOutputSourceState",
"sensor_descr": "Output Source",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 3,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": "0",
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "upsOutputSourceState"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.7.0",
"sensor_index": "0",
"sensor_type": "rfc1628",
"sensor_descr": "Battery",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 35,
"sensor_limit": 55,
"sensor_limit_warn": null,
"sensor_limit_low": 25,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.4.4.1.2.1.0",
"sensor_index": "1",
"sensor_type": "rfc1628",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 115,
"sensor_limit": 132.25,
"sensor_limit_warn": null,
"sensor_limit_low": 97.75,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.2.5.0",
"sensor_index": "1.2.5.0",
"sensor_type": "rfc1628",
"sensor_descr": "Battery",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 216.9,
"sensor_limit": 249.435,
"sensor_limit_warn": null,
"sensor_limit_low": 184.365,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.3.3.1.3.1.0",
"sensor_index": "101",
"sensor_type": "rfc1628",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 224,
"sensor_limit": 257.6,
"sensor_limit_warn": null,
"sensor_limit_low": 190.4,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.2.1.33.1.5.3.1.2.1",
"sensor_index": "201",
"sensor_type": "rfc1628",
"sensor_descr": "Bypass",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": 257.6,
"sensor_limit_warn": null,
"sensor_limit_low": 190.4,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": 224,
"user_func": null,
"state_name": null
}
],
"state_indexes": [
{
"state_name": "upsBatteryStatusState",
"state_descr": "Unknown",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "upsBatteryStatusState",
"state_descr": "Normal",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "upsBatteryStatusState",
"state_descr": "Low",
"state_draw_graph": 0,
"state_value": 3,
"state_generic_value": 2
},
{
"state_name": "upsBatteryStatusState",
"state_descr": "Depleted",
"state_draw_graph": 0,
"state_value": 4,
"state_generic_value": 2
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Other",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "upsOutputSourceState",
"state_descr": "None",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 3
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Normal",
"state_draw_graph": 0,
"state_value": 3,
"state_generic_value": 0
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Bypass",
"state_draw_graph": 0,
"state_value": 4,
"state_generic_value": 1
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Battery",
"state_draw_graph": 0,
"state_value": 5,
"state_generic_value": 2
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Booster",
"state_draw_graph": 0,
"state_value": 6,
"state_generic_value": 2
},
{
"state_name": "upsOutputSourceState",
"state_descr": "Reducer",
"state_draw_graph": 0,
"state_value": 7,
"state_generic_value": 2
}
]
}
}
}