mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add basic support for Emerson Netsure Controllers (#12091)
This commit is contained in:
@@ -1183,6 +1183,7 @@ function fahrenheit_to_celsius($value, $scale = 'fahrenheit')
|
||||
* @param string $scale fahrenheit or celsius
|
||||
* @return string (containing a float)
|
||||
*/
|
||||
|
||||
function celsius_to_fahrenheit($value, $scale = 'celsius')
|
||||
{
|
||||
if ($scale === 'celsius') {
|
||||
@@ -1191,6 +1192,15 @@ function celsius_to_fahrenheit($value, $scale = 'celsius')
|
||||
return sprintf('%.02f', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts string to float
|
||||
*
|
||||
*/
|
||||
function string_to_float($value)
|
||||
{
|
||||
return sprintf('%.02f', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts uW to dBm
|
||||
* $value must be positive
|
||||
|
64
includes/definitions/discovery/netsure.yaml
Normal file
64
includes/definitions/discovery/netsure.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
mib: VEC-MIBv5-9
|
||||
modules:
|
||||
sensors:
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: psHighestSeverityLevel
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.1.10.0'
|
||||
descr: 'System Status'
|
||||
states:
|
||||
- { descr: normal, graph: 1, value: 0, generic: 0 }
|
||||
- { descr: minor, graph: 1, value: 1, generic: 1 }
|
||||
- { descr: major, graph: 1, value: 2, generic: 2 }
|
||||
voltage:
|
||||
data:
|
||||
-
|
||||
oid: psSenseVoltage
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.1.5.{{ $index }}'
|
||||
index: 'psSenseVoltage.{{ $index }}'
|
||||
descr: 'Sense DC Voltage'
|
||||
low_limit: 45.0
|
||||
low_warn_limit: 50.0
|
||||
warn_limit: 56.5
|
||||
high_limit: 58.0
|
||||
-
|
||||
oid: psSystemVoltage
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.1.1.{{ $index }}'
|
||||
index: 'psSystemVoltage.{{ $index }}'
|
||||
descr: 'System DC Voltage'
|
||||
low_limit: 45.0
|
||||
low_warn_limit: 50.0
|
||||
warn_limit: 56.5
|
||||
high_limit: 58.0
|
||||
current:
|
||||
data:
|
||||
-
|
||||
oid: psSystemCurrent
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.1.2.{{ $index }}'
|
||||
index: 'psSystemCurrent.{{ $index }}'
|
||||
descr: 'System Current'
|
||||
-
|
||||
oid: psPCUTotalCurrent
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.1.6.{{ $index }}'
|
||||
index: 'psPCUTotalCurrent.{{ $index }}'
|
||||
descr: 'Total PCU Current'
|
||||
user_func: string_to_float
|
||||
-
|
||||
oid: psBatteryCurrent
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.1.7.{{ $index }}'
|
||||
index: 'psBatteryCurrent.{{ $index }}'
|
||||
descr: 'Total Battery Current'
|
||||
user_func: string_to_float
|
||||
-
|
||||
oid: psDistributionTable
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.4.1.2.{{ $index }}'
|
||||
value: psShuntCurrent
|
||||
index: 'psShuntCurrent.{{ $index }}'
|
||||
descr: 'Shunt Current #{{ $index }}'
|
||||
user_func: string_to_float
|
||||
-
|
||||
oid: psPCUCurrent
|
||||
num_oid: '.1.3.6.1.4.1.885.3.2.5.1.3.{{ $index }}'
|
||||
index: 'psPCUCurrent.{{ $index }}'
|
||||
descr: 'PCU Current #{{ $index }}'
|
40
includes/definitions/netsure.yaml
Normal file
40
includes/definitions/netsure.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
os: netsure
|
||||
text: 'Emerson Netsure'
|
||||
type: power
|
||||
icon: emerson
|
||||
over:
|
||||
- { graph: device_current, text: Current }
|
||||
- { graph: device_voltage, text: Voltage }
|
||||
- { graph: device_state, text: State }
|
||||
mib_dir: emerson
|
||||
discovery:
|
||||
-
|
||||
sysObjectID:
|
||||
- .1.3.6.1.4.1.885.3
|
||||
discovery_modules:
|
||||
storage: false
|
||||
bgp-peers: false
|
||||
ntp: false
|
||||
stp: false
|
||||
diskio: false
|
||||
vlans: false
|
||||
arp-table: false
|
||||
discovery-protocols: false
|
||||
hr-device: false
|
||||
mempools: false
|
||||
entity-physical: false
|
||||
ports-stack: false
|
||||
ucd-diskio: false
|
||||
processors: false
|
||||
mpls: false
|
||||
wireless: false
|
||||
fdb-table: false
|
||||
services: false
|
||||
cisco-vrf-lite: false
|
||||
poller_modules:
|
||||
ospf: false
|
||||
ntp: false
|
||||
services: false
|
||||
storage: false
|
||||
ucd-diskio: false
|
||||
mpls: false
|
Reference in New Issue
Block a user