librenms/tests/data/liebert.json

1242 lines
53 KiB
JSON
Raw Normal View History

{
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.476.1.42",
"sysDescr": "Liebert GXT2-3000RT120",
"sysContact": "<private>",
"version": null,
"hardware": null,
"features": null,
"os": "liebert",
"type": "power",
"serial": null,
"icon": "vertiv.png",
"location": "<private>"
}
]
},
"poller": "matches discovery"
},
"sensors": {
"discovery": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "count",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.160.1.1",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.1",
"sensor_type": "liebert",
"sensor_descr": "Utilization Percent Branch 1",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 71.4,
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": "count",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.160.1.2",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.2",
"sensor_type": "liebert",
"sensor_descr": "Utilization Percent Branch 2",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 9.8,
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": "count",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.160.1.3",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.3",
"sensor_type": "liebert",
"sensor_descr": "Utilization Percent Branch 3",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 21,
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.4.1.476.1.42.3.8.30.40.1.22.1.1.1",
"sensor_index": "1.1.1lgpPduPsLineEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "Total Input Line 1",
"group": null,
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 2045,
"sensor_limit": 240,
"sensor_limit_warn": 225,
"sensor_limit_low": 0,
"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.4.1.476.1.42.3.8.30.20.1.70.1.1",
"sensor_index": "1.1lgpPduPsEntryEcNeutral",
"sensor_type": "liebert",
"sensor_descr": "Neutral ",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 204,
"sensor_limit": 240,
"sensor_limit_warn": 225,
"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.4.1.476.1.42.3.8.40.20.1.130.1.1",
"sensor_index": "1.1lgpPduRbEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "RMS Branch 1",
"group": "Line to Neutral",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1428,
"sensor_limit": 285,
"sensor_limit_warn": 270,
"sensor_limit_low": 0,
"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.4.1.476.1.42.3.8.40.20.1.130.1.2",
"sensor_index": "1.2lgpPduRbEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "RMS Branch 2",
"group": "Line to Neutral",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 196,
"sensor_limit": 285,
"sensor_limit_warn": 270,
"sensor_limit_low": 0,
"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.4.1.476.1.42.3.8.40.20.1.130.1.3",
"sensor_index": "1.3lgpPduRbEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "RMS Branch 3",
"group": "Line to Neutral",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 419,
"sensor_limit": 285,
"sensor_limit_warn": 270,
"sensor_limit_low": 0,
"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.4.1.476.1.42.3.8.40.20.1.150.1.1",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.1",
"sensor_type": "liebert",
"sensor_descr": "Before Alarm Branch 1",
"group": "Available",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 4.71,
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.4.1.476.1.42.3.8.40.20.1.150.1.2",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.2",
"sensor_type": "liebert",
"sensor_descr": "Before Alarm Branch 2",
"group": "Available",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 17.04,
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.4.1.476.1.42.3.8.40.20.1.150.1.3",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.3",
"sensor_type": "liebert",
"sensor_descr": "Before Alarm Branch 3",
"group": "Available",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 14.8,
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": "humidity",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.95.1.1.1",
"sensor_index": "lgpPduAuxMeasHum.1.1.1",
"sensor_type": "liebert",
"sensor_descr": "Humidity for 10000001ACA3F226",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 14.2,
"sensor_limit": 60,
"sensor_limit_warn": 56,
"sensor_limit_low": 40,
"sensor_limit_low_warn": 44,
"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": "humidity",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.95.1.4.1",
"sensor_index": "lgpPduAuxMeasHum.1.4.1",
"sensor_type": "liebert",
"sensor_descr": "Humidity for 81000001ACACCC26",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 17.2,
"sensor_limit": 60,
"sensor_limit_warn": 56,
"sensor_limit_low": 40,
"sensor_limit_low_warn": 44,
"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.4.1.476.1.42.3.8.30.20.1.65.1.1",
"sensor_index": "lgpPduPsEntryPwrTotal.1.1",
"sensor_type": "liebert",
"sensor_descr": "Total for MPH-NCV27AXXD30",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 2411,
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": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.2.5.2.0",
"sensor_index": "lgpAgentTelnetEnabled.0",
"sensor_type": "lgpAgentTelnetEnabled",
"sensor_descr": "Telnet Enabled",
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
"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": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "lgpAgentTelnetEnabled"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.2.5.3.0",
"sensor_index": "lgpAgentVelocityServerEnabled.0",
"sensor_type": "lgpAgentVelocityServerEnabled",
"sensor_descr": "Velocity Server Enabled",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"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": "lgpAgentVelocityServerEnabled"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.2.5.4.0",
"sensor_index": "lgpAgentWebServerMode.0",
"sensor_type": "lgpAgentWebServerMode",
"sensor_descr": "Webserver Mode",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"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": "lgpAgentWebServerMode"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.20.1.25.1",
"sensor_index": "lgpPduGrpSysStatus.1",
"sensor_type": "lgpPduEntrySysStatus",
"sensor_descr": "System Status",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 16,
"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": "lgpPduEntrySysStatus"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.2.1",
"sensor_index": "lgpPduAuxMeasTempDegC.1.2.1",
"sensor_type": "liebert",
"sensor_descr": "Temp for 3C00000032C6E342",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 17.5,
"sensor_limit": 27,
"sensor_limit_warn": 25,
"sensor_limit_low": 18,
"sensor_limit_low_warn": 20,
"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": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.3.1",
"sensor_index": "lgpPduAuxMeasTempDegC.1.3.1",
"sensor_type": "liebert",
"sensor_descr": "Temp for 410000003263B542",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 20.1,
"sensor_limit": 27,
"sensor_limit_warn": 25,
"sensor_limit_low": 18,
"sensor_limit_low_warn": 20,
"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.4.1.476.1.42.3.8.30.40.1.19.1.1.1",
"sensor_index": "lgpPduPsLineEntryEpLNTenths.1.1.1",
"sensor_type": "liebert",
"sensor_descr": "AC RMS 1",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 119.6,
"sensor_limit": 137.54,
"sensor_limit_warn": null,
"sensor_limit_low": 101.66,
"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": "lgpAgentTelnetEnabled",
"state_descr": "yes",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "lgpAgentTelnetEnabled",
"state_descr": "no",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 2
},
{
"state_name": "lgpAgentVelocityServerEnabled",
"state_descr": "yes",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "lgpAgentVelocityServerEnabled",
"state_descr": "no",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 2
},
{
"state_name": "lgpAgentWebServerMode",
"state_descr": "disabled",
"state_draw_graph": 0,
"state_value": 0,
"state_generic_value": 2
},
{
"state_name": "lgpAgentWebServerMode",
"state_descr": "http",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 1
},
{
"state_name": "lgpAgentWebServerMode",
"state_descr": "https",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "normalOperation",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "startUp",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 1
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "unknownNoSupport",
"state_draw_graph": 0,
"state_value": 4,
"state_generic_value": 3
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "normalWithWarning",
"state_draw_graph": 0,
"state_value": 8,
"state_generic_value": 1
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "normalWithAlarm",
"state_draw_graph": 0,
"state_value": 16,
"state_generic_value": 2
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "abnormalOperation",
"state_draw_graph": 0,
"state_value": 32,
"state_generic_value": 2
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "unknownCommFailure",
"state_draw_graph": 0,
"state_value": 64,
"state_generic_value": 2
}
]
},
"poller": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "count",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.160.1.1",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.1",
"sensor_type": "liebert",
"sensor_descr": "Utilization Percent Branch 1",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 71.4,
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": "count",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.160.1.2",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.2",
"sensor_type": "liebert",
"sensor_descr": "Utilization Percent Branch 2",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 9.8,
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": "count",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.160.1.3",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.3",
"sensor_type": "liebert",
"sensor_descr": "Utilization Percent Branch 3",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 21,
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.4.1.476.1.42.3.8.30.40.1.22.1.1.1",
"sensor_index": "1.1.1lgpPduPsLineEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "Total Input Line 1",
"group": null,
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 20.45,
"sensor_limit": 240,
"sensor_limit_warn": 225,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": 2045,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.30.20.1.70.1.1",
"sensor_index": "1.1lgpPduPsEntryEcNeutral",
"sensor_type": "liebert",
"sensor_descr": "Neutral ",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 20.4,
"sensor_limit": 240,
"sensor_limit_warn": 225,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": 204,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.130.1.1",
"sensor_index": "1.1lgpPduRbEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "RMS Branch 1",
"group": "Line to Neutral",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 14.28,
"sensor_limit": 285,
"sensor_limit_warn": 270,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": 1428,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.130.1.2",
"sensor_index": "1.2lgpPduRbEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "RMS Branch 2",
"group": "Line to Neutral",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 1.96,
"sensor_limit": 285,
"sensor_limit_warn": 270,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": 196,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.130.1.3",
"sensor_index": "1.3lgpPduRbEntryEcHundredths",
"sensor_type": "liebert",
"sensor_descr": "RMS Branch 3",
"group": "Line to Neutral",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 4.19,
"sensor_limit": 285,
"sensor_limit_warn": 270,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": 419,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.40.20.1.150.1.1",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.1",
"sensor_type": "liebert",
"sensor_descr": "Before Alarm Branch 1",
"group": "Available",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 4.71,
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.4.1.476.1.42.3.8.40.20.1.150.1.2",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.2",
"sensor_type": "liebert",
"sensor_descr": "Before Alarm Branch 2",
"group": "Available",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 17.04,
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.4.1.476.1.42.3.8.40.20.1.150.1.3",
"sensor_index": "lgpPduRbEntryEcAvailBeforeAlarmHundredths.1.3",
"sensor_type": "liebert",
"sensor_descr": "Before Alarm Branch 3",
"group": "Available",
"sensor_divisor": 100,
"sensor_multiplier": 1,
"sensor_current": 14.8,
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": "humidity",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.95.1.1.1",
"sensor_index": "lgpPduAuxMeasHum.1.1.1",
"sensor_type": "liebert",
"sensor_descr": "Humidity for 10000001ACA3F226",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 14.2,
"sensor_limit": 60,
"sensor_limit_warn": 56,
"sensor_limit_low": 40,
"sensor_limit_low_warn": 44,
"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": "humidity",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.95.1.4.1",
"sensor_index": "lgpPduAuxMeasHum.1.4.1",
"sensor_type": "liebert",
"sensor_descr": "Humidity for 81000001ACACCC26",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 17.2,
"sensor_limit": 60,
"sensor_limit_warn": 56,
"sensor_limit_low": 40,
"sensor_limit_low_warn": 44,
"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.4.1.476.1.42.3.8.30.20.1.65.1.1",
"sensor_index": "lgpPduPsEntryPwrTotal.1.1",
"sensor_type": "liebert",
"sensor_descr": "Total for MPH-NCV27AXXD30",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 2411,
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": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.2.5.2.0",
"sensor_index": "lgpAgentTelnetEnabled.0",
"sensor_type": "lgpAgentTelnetEnabled",
"sensor_descr": "Telnet Enabled",
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
"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": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "lgpAgentTelnetEnabled"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.2.5.3.0",
"sensor_index": "lgpAgentVelocityServerEnabled.0",
"sensor_type": "lgpAgentVelocityServerEnabled",
"sensor_descr": "Velocity Server Enabled",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"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": "lgpAgentVelocityServerEnabled"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.2.5.4.0",
"sensor_index": "lgpAgentWebServerMode.0",
"sensor_type": "lgpAgentWebServerMode",
"sensor_descr": "Webserver Mode",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"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": "lgpAgentWebServerMode"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.20.1.25.1",
"sensor_index": "lgpPduGrpSysStatus.1",
"sensor_type": "lgpPduEntrySysStatus",
"sensor_descr": "System Status",
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
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 16,
"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": "lgpPduEntrySysStatus"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.2.1",
"sensor_index": "lgpPduAuxMeasTempDegC.1.2.1",
"sensor_type": "liebert",
"sensor_descr": "Temp for 3C00000032C6E342",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 17.5,
"sensor_limit": 27,
"sensor_limit_warn": 25,
"sensor_limit_low": 18,
"sensor_limit_low_warn": 20,
"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": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.3.1",
"sensor_index": "lgpPduAuxMeasTempDegC.1.3.1",
"sensor_type": "liebert",
"sensor_descr": "Temp for 410000003263B542",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 20.1,
"sensor_limit": 27,
"sensor_limit_warn": 25,
"sensor_limit_low": 18,
"sensor_limit_low_warn": 20,
"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.4.1.476.1.42.3.8.30.40.1.19.1.1.1",
"sensor_index": "lgpPduPsLineEntryEpLNTenths.1.1.1",
"sensor_type": "liebert",
"sensor_descr": "AC RMS 1",
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
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 119.6,
"sensor_limit": 137.54,
"sensor_limit_warn": null,
"sensor_limit_low": 101.66,
"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": "lgpAgentTelnetEnabled",
"state_descr": "yes",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "lgpAgentTelnetEnabled",
"state_descr": "no",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 2
},
{
"state_name": "lgpAgentVelocityServerEnabled",
"state_descr": "yes",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "lgpAgentVelocityServerEnabled",
"state_descr": "no",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 2
},
{
"state_name": "lgpAgentWebServerMode",
"state_descr": "disabled",
"state_draw_graph": 0,
"state_value": 0,
"state_generic_value": 2
},
{
"state_name": "lgpAgentWebServerMode",
"state_descr": "http",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 1
},
{
"state_name": "lgpAgentWebServerMode",
"state_descr": "https",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "normalOperation",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "startUp",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 1
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "unknownNoSupport",
"state_draw_graph": 0,
"state_value": 4,
"state_generic_value": 3
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "normalWithWarning",
"state_draw_graph": 0,
"state_value": 8,
"state_generic_value": 1
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "normalWithAlarm",
"state_draw_graph": 0,
"state_value": 16,
"state_generic_value": 2
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "abnormalOperation",
"state_draw_graph": 0,
"state_value": 32,
"state_generic_value": 2
},
{
"state_name": "lgpPduEntrySysStatus",
"state_descr": "unknownCommFailure",
"state_draw_graph": 0,
"state_value": 64,
"state_generic_value": 2
}
]
}
}
}