mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
snmpwalk_cache_oid() handle multiline strings (#12254)
* snmpwalk_cache_oid handle multiline strings * remove useless function * some output has no space after equals * airos-af-ltu use hr processors * don't try to append with empty strings * fix changed test data due to fix * revert smartax * better regex additional check
This commit is contained in:
@@ -408,45 +408,9 @@
|
||||
"processor_descr": "Cpu-1/0/1",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
},
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.3807.1.8012.1.4.1.1.2.",
|
||||
"processor_index": "",
|
||||
"processor_type": "fiberhome-switch",
|
||||
"processor_usage": 0,
|
||||
"processor_descr": "cpuIndexDescr",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"processors": [
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.3807.1.8012.1.4.1.1.2.3222475008",
|
||||
"processor_index": "3222475008",
|
||||
"processor_type": "fiberhome-switch",
|
||||
"processor_usage": 0,
|
||||
"processor_descr": "Cpu-1/0/1",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
},
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.3807.1.8012.1.4.1.1.2.",
|
||||
"processor_index": "",
|
||||
"processor_type": "fiberhome-switch",
|
||||
"processor_usage": 0,
|
||||
"processor_descr": "cpuIndexDescr",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
}
|
||||
]
|
||||
}
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
||||
|
@@ -97,45 +97,9 @@
|
||||
"processor_descr": "Cpu-1",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
},
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.3807.1.8012.1.4.1.1.2.",
|
||||
"processor_index": "",
|
||||
"processor_type": "fiberhome-switch",
|
||||
"processor_usage": 0,
|
||||
"processor_descr": "cpuIndexDescr",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"processors": [
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.3807.1.8012.1.4.1.1.2.1",
|
||||
"processor_index": "1",
|
||||
"processor_type": "fiberhome-switch",
|
||||
"processor_usage": 0,
|
||||
"processor_descr": "Cpu-1",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
},
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.3807.1.8012.1.4.1.1.2.",
|
||||
"processor_index": "",
|
||||
"processor_type": "fiberhome-switch",
|
||||
"processor_usage": 0,
|
||||
"processor_descr": "cpuIndexDescr",
|
||||
"processor_precision": 100,
|
||||
"processor_perc_warn": 75
|
||||
}
|
||||
]
|
||||
}
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
||||
|
@@ -651,7 +651,7 @@
|
||||
"toner_index": 1,
|
||||
"toner_type": "tonerCartridge",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.1",
|
||||
"toner_descr": "Black Cartridge",
|
||||
"toner_descr": "Black Cartridge827A HP CF300A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 92,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.1"
|
||||
@@ -660,7 +660,7 @@
|
||||
"toner_index": 10,
|
||||
"toner_type": "fuser",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.10",
|
||||
"toner_descr": "Fuser Kit HP 110",
|
||||
"toner_descr": "Fuser Kit HP 110V-C1N54A, 220V-C",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 84,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.10"
|
||||
@@ -669,7 +669,7 @@
|
||||
"toner_index": 11,
|
||||
"toner_type": "other",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.11",
|
||||
"toner_descr": "Document Feeder",
|
||||
"toner_descr": "Document FeederKit HP C1P70A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 99,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.11"
|
||||
@@ -678,7 +678,7 @@
|
||||
"toner_index": 12,
|
||||
"toner_type": "other",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.12",
|
||||
"toner_descr": "Clean Rollers HP",
|
||||
"toner_descr": "Clean Rollers HP None",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 97,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.12"
|
||||
@@ -687,7 +687,7 @@
|
||||
"toner_index": 13,
|
||||
"toner_type": "staples",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.13",
|
||||
"toner_descr": "Stapler 1 HP C80",
|
||||
"toner_descr": "Stapler 1 HP C8091A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 50,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.13"
|
||||
@@ -696,7 +696,7 @@
|
||||
"toner_index": 14,
|
||||
"toner_type": "staples",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.14",
|
||||
"toner_descr": "Stapler 2 HP CC3",
|
||||
"toner_descr": "Stapler 2 HP CC383A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 50,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.14"
|
||||
@@ -705,7 +705,7 @@
|
||||
"toner_index": 15,
|
||||
"toner_type": "staples",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.15",
|
||||
"toner_descr": "Stapler 3 HP CC3",
|
||||
"toner_descr": "Stapler 3 HP CC383A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 50,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.15"
|
||||
@@ -714,7 +714,7 @@
|
||||
"toner_index": 2,
|
||||
"toner_type": "tonerCartridge",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.2",
|
||||
"toner_descr": "Cyan Cartridge 8",
|
||||
"toner_descr": "Cyan Cartridge 827A HP CF301A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 16,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.2"
|
||||
@@ -723,7 +723,7 @@
|
||||
"toner_index": 3,
|
||||
"toner_type": "tonerCartridge",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.3",
|
||||
"toner_descr": "Magenta Cartridg",
|
||||
"toner_descr": "Magenta Cartridge 827A HP CF303A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 100,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.3"
|
||||
@@ -732,7 +732,7 @@
|
||||
"toner_index": 4,
|
||||
"toner_type": "tonerCartridge",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.4",
|
||||
"toner_descr": "Yellow Cartridge",
|
||||
"toner_descr": "Yellow Cartridge 827A HP CF302A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 70,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.4"
|
||||
@@ -741,7 +741,7 @@
|
||||
"toner_index": 5,
|
||||
"toner_type": "opc",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.5",
|
||||
"toner_descr": "Black Drum 828A",
|
||||
"toner_descr": "Black Drum 828AHP CF358A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 53,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.5"
|
||||
@@ -750,7 +750,7 @@
|
||||
"toner_index": 6,
|
||||
"toner_type": "opc",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.6",
|
||||
"toner_descr": "Cyan Drum 828A H",
|
||||
"toner_descr": "Cyan Drum 828A HP CF359A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 58,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.6"
|
||||
@@ -759,7 +759,7 @@
|
||||
"toner_index": 7,
|
||||
"toner_type": "opc",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.7",
|
||||
"toner_descr": "Magenta Drum 828",
|
||||
"toner_descr": "Magenta Drum 828A HP CF365A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 58,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.7"
|
||||
@@ -768,7 +768,7 @@
|
||||
"toner_index": 8,
|
||||
"toner_type": "opc",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.8",
|
||||
"toner_descr": "Yellow Drum 828A",
|
||||
"toner_descr": "Yellow Drum 828A HP CF364A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 58,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.8"
|
||||
@@ -777,7 +777,7 @@
|
||||
"toner_index": 9,
|
||||
"toner_type": "transferUnit",
|
||||
"toner_oid": ".1.3.6.1.2.1.43.11.1.1.9.1.9",
|
||||
"toner_descr": "Transfer Kit HP",
|
||||
"toner_descr": "Transfer Kit HPD7H14A",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 89,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8.1.9"
|
||||
@@ -817,15 +817,6 @@
|
||||
"toner_capacity": 2000,
|
||||
"toner_current": 20,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.8.2.1.9.1.5"
|
||||
},
|
||||
{
|
||||
"toner_index": 0,
|
||||
"toner_type": "markerSupply",
|
||||
"toner_oid": ".1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.",
|
||||
"toner_descr": "0",
|
||||
"toner_capacity": 100,
|
||||
"toner_current": 0,
|
||||
"toner_capacity_oid": ".1.3.6.1.2.1.43.11.1.1.8."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user