--- /dev/null
+++ b/includes/definitions/mibs/ibmi.inc.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package        observium
+ * @subpackage     definitions
+ * @copyright  (C) Adam Armstrong
+ *
+ */
+
+// IBM i (OS/400) native SNMP agent
+
+$mib = 'IBM-I-SYSTEM-MIB';
+$config['mibs'][$mib]['enable'] = 1;
+$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.2.6.4.5';
+$config['mibs'][$mib]['mib_dir'] = 'ibmi';
+$config['mibs'][$mib]['descr'] = 'IBM i system objects (local subset)';
+
+// Partition-wide CPU, same figure as WRKSYSSTS "% CPU used"
+// IBM-I-SYSTEM-MIB::ibmiSystemCpuUtil.0 = Gauge32: 860 hundredths of a percent
+$config['mibs'][$mib]['processor']['ibmiSystemCpuUtil'] = [
+  'descr'   => 'System CPU',
+  'oid'     => 'ibmiSystemCpuUtil',
+  'oid_num' => '.1.3.6.1.4.1.2.6.4.5.1',
+  'indexes' => [ 0 => [ 'descr' => 'System CPU' ] ],
+  'scale'   => 0.01
+];
+
+// HOST-RESOURCES-MIB::hrDeviceStatus for disk units, tape, optical, IOAs and ports.
+// Entities are created only for IBM i by includes/discovery/status/ibm-i-system-mib.inc.php,
+// states live under HOST-RESOURCES-MIB so the poller can walk hrDeviceStatus as a table.
+$type = 'hrDeviceStatus';
+$config['mibs']['HOST-RESOURCES-MIB']['states'][$type][1] = [ 'name' => 'unknown', 'event' => 'warning' ];
+$config['mibs']['HOST-RESOURCES-MIB']['states'][$type][2] = [ 'name' => 'running', 'event' => 'ok' ];
+$config['mibs']['HOST-RESOURCES-MIB']['states'][$type][3] = [ 'name' => 'warning', 'event' => 'warning' ];
+$config['mibs']['HOST-RESOURCES-MIB']['states'][$type][4] = [ 'name' => 'testing', 'event' => 'warning' ];
+$config['mibs']['HOST-RESOURCES-MIB']['states'][$type][5] = [ 'name' => 'down',    'event' => 'alert' ];
+
+// EOF
--- a/includes/definitions/os/ibm.inc.php
+++ b/includes/definitions/os/ibm.inc.php
@@ -19,7 +19,7 @@
 $config['os'][$os]['type']                  = "server";
 $config['os'][$os]['port_label'][]          = '/(.+?);/'; // en0; Product: 2-Port 10/100/1000 Base-TX PCI-X Adapter Manufacturer: not available! Part Number: not available! FRU Number: not available!
 $config['os'][$os]['graphs'][]              = "device_processor";
-$config['os'][$os]['graphs'][]              = "device_ucd_memory";
+$config['os'][$os]['graphs'][]              = "device_mempool";
 $config['os'][$os]['graphs'][]              = "device_storage";
 $config['os'][$os]['graphs'][]              = "device_bits";
 $config['os'][$os]['sysDescr'][]            = "/^AIX /";
@@ -34,6 +34,12 @@
 $config['os'][$os]['type']                  = "server";
 $config['os'][$os]['group']                 = "unix";
 $config['os'][$os]['sysObjectID'][]         = ".1.3.6.1.4.1.2.6.11";
+// IBM OS/400 V7R5M0
+$config['os'][$os]['sysDescr_regex'][]      = '/OS\/400 (?<version>V\d+R\d+M\d+)/';
+$config['os'][$os]['mibs'][]                = "IBM-I-SYSTEM-MIB";
+$config['os'][$os]['graphs'][]              = "device_processor";
+$config['os'][$os]['graphs'][]              = "device_mempool";
+$config['os'][$os]['graphs'][]              = "device_bits";
 
 $os = "ibmnos";
 $config['os'][$os]['text']                  = "IBM NOS";
--- /dev/null
+++ b/includes/discovery/status/ibm-i-system-mib.inc.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package        observium
+ * @subpackage     discovery
+ * @copyright  (C) Adam Armstrong
+ *
+ */
+
+// IBM i hardware resources from HOST-RESOURCES-MIB::hrDeviceTable.
+// hrDeviceID encodes "<type><model><resource>" as OID subidentifiers under .1.3.6.1.4.1.2.9.1:
+// HOST-RESOURCES-MIB::hrDeviceDescr.27 = STRING: "Unit{ disco"
+// HOST-RESOURCES-MIB::hrDeviceID.27 = OID: .1.3.6.1.4.1.2.9.1.50.49.52.53.48.53.48.68.77.80.48.48.49.32.32.32.32  ("2145050DMP001    ")
+// HOST-RESOURCES-MIB::hrDeviceStatus.27 = INTEGER: running(2)
+
+// HOST-RESOURCES-TYPES hrDeviceTypes.N (returned unresolved, as hrDeviceTypes.6)
+$hr_classes = [
+    3  => [ 'descr' => 'Processor',  'class' => 'cpu' ],     // hrDeviceProcessor
+    4  => [ 'descr' => 'Port',       'class' => 'port' ],    // hrDeviceNetwork
+    6  => [ 'descr' => 'Disk unit',  'class' => 'storage' ], // hrDeviceDiskStorage
+    18 => [ 'descr' => 'Tape',       'class' => 'storage' ], // hrDeviceTape
+];
+
+$hr_devices = snmpwalk_cache_oid($device, 'hrDeviceType',   [], 'HOST-RESOURCES-MIB');
+$hr_devices = snmpwalk_cache_oid($device, 'hrDeviceDescr',  $hr_devices, 'HOST-RESOURCES-MIB');
+$hr_devices = snmpwalk_cache_oid($device, 'hrDeviceStatus', $hr_devices, 'HOST-RESOURCES-MIB', NULL, OBS_SNMP_ALL_ENUM);
+$hr_ids     = snmpwalk_cache_oid($device, 'hrDeviceID',     [], 'HOST-RESOURCES-MIB', NULL, OBS_SNMP_ALL_NUMERIC);
+
+print_debug_vars($hr_devices);
+
+foreach ($hr_devices as $index => $entry) {
+    $hr_type = (int)substr(strrchr($entry['hrDeviceType'], '.'), 1);
+    if (!isset($entry['hrDeviceStatus'], $hr_classes[$hr_type])) {
+        continue;
+    }
+    $class = $hr_classes[$hr_type];
+
+    // Decode hrDeviceID, fixed width: type (4), model (3, may be blank), resource name
+    $resource  = '';
+    $typemodel = '';
+    $id = $hr_ids['.1.3.6.1.2.1.25.3.2.1.4.' . $index] ?? '';
+    if (preg_match('/^\.?1\.3\.6\.1\.4\.1\.2\.9\.1\.([\d\.]+)$/', $id, $matches)) {
+        $string    = implode('', array_map('chr', explode('.', $matches[1])));
+        $typemodel = trim(substr($string, 0, 4) . '-' . trim(substr($string, 4, 3)), '-');
+        $resource  = trim(substr($string, 7));
+    }
+
+    // Optical and diskette units also report as hrDeviceDiskStorage (descr is localised: "File ottico", "Unità minidisco")
+    $descr = $class['descr'];
+    if (str_icontains_array($entry['hrDeviceDescr'], [ 'ottic', 'optic' ])) {
+        $descr = 'Optical';
+    } elseif (str_icontains_array($entry['hrDeviceDescr'], [ 'minidisc', 'diskette' ])) {
+        $descr = 'Diskette';
+    }
+    if (str_starts_with($resource, 'CEC')) {
+        // Main card enclosure, carries the machine type-model
+        $descr = 'System unit ' . $resource . ' (' . $typemodel . ')';
+    } elseif (preg_match('/^DC\d+$/', $resource)) {
+        // Storage IOA, listed once per device class it serves
+        $descr = 'Storage IOA ' . $resource . ' (' . $typemodel . ') ' . strtolower($descr);
+    } elseif ($resource) {
+        $descr .= ' ' . $resource . ' (' . $typemodel . ')';
+    } else {
+        $descr .= ' ' . $index;
+    }
+
+    $oid = '.1.3.6.1.2.1.25.3.2.1.5.' . $index;
+    discover_status_ng($device, 'HOST-RESOURCES-MIB', 'hrDeviceStatus', $oid, $index, 'hrDeviceStatus', $descr,
+                       $entry['hrDeviceStatus'], [ 'entPhysicalClass' => $class['class'] ]);
+}
+
+unset($hr_classes, $hr_type, $hr_devices, $hr_ids, $class, $id, $string, $resource, $typemodel, $descr, $oid, $matches);
+
+// EOF
--- /dev/null
+++ b/includes/polling/os/ibmi.inc.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package        observium
+ * @subpackage     poller
+ * @copyright  (C) Adam Armstrong
+ *
+ */
+
+// IBM i does not expose the system model or serial in a scalar. The main card enclosure
+// (hrDevice index 1) carries the machine type-model in hrDeviceID:
+// HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: "Contenitore schede principale"
+// HOST-RESOURCES-MIB::hrDeviceID.1 = OID: .1.3.6.1.4.1.2.9.1.57.49.48.53.50.50.65.67.69.67.48.49.32.32.32.32.32  ("910522ACEC01     ")
+
+$ibmi_models = [
+    // Power9
+    '9009-41A' => 'Power S914',  '9009-22A' => 'Power S922',  '9009-42A' => 'Power S924',
+    '9008-22L' => 'Power L922',  '9223-22H' => 'Power H922',  '9223-42H' => 'Power H924',
+    '9040-MR9' => 'Power E950',  '9080-M9S' => 'Power E980',
+    // Power10
+    '9105-41B' => 'Power S1014', '9105-22A' => 'Power S1022', '9105-22B' => 'Power S1022s',
+    '9105-42A' => 'Power S1024', '9786-22H' => 'Power L1022', '9786-42H' => 'Power L1024',
+    '9043-MRX' => 'Power E1050', '9080-HEX' => 'Power E1080',
+];
+
+$hr_id = snmp_get_oid($device, '.1.3.6.1.2.1.25.3.2.1.4.1', 'HOST-RESOURCES-MIB', NULL, OBS_SNMP_ALL_NUMERIC);
+if (preg_match('/^\.?1\.3\.6\.1\.4\.1\.2\.9\.1\.([\d\.]+)$/', $hr_id, $matches)) {
+    $string    = implode('', array_map('chr', explode('.', $matches[1])));
+    $typemodel = substr($string, 0, 4) . '-' . substr($string, 4, 3);
+    if (preg_match('/^[0-9A-Z]{4}-[0-9A-Z]{3}$/', $typemodel)) {
+        $hardware = isset($ibmi_models[$typemodel]) ? $ibmi_models[$typemodel] . ' (' . $typemodel . ')' : $typemodel;
+    }
+}
+
+unset($ibmi_models, $hr_id, $string, $typemodel, $matches);
+
+// EOF
--- /dev/null
+++ b/mibs/ibmi/IBM-I-SYSTEM-MIB
@@ -0,0 +1,32 @@
+IBM-I-SYSTEM-MIB DEFINITIONS ::= BEGIN
+
+-- Hand-written subset for the IBM i (OS/400) SNMP agent.
+-- IBM does not publish a MIB file for these objects; only the ones
+-- verified against an IBM i 7.5 agent are described here.
+
+IMPORTS
+    MODULE-IDENTITY, OBJECT-TYPE, Gauge32, enterprises
+        FROM SNMPv2-SMI;
+
+ibmiSystemMIB MODULE-IDENTITY
+    LAST-UPDATED "202610170000Z"
+    ORGANIZATION "Observium community contribution"
+    CONTACT-INFO "Observium community contribution"
+    DESCRIPTION  "Local subset of the IBM i system objects."
+    ::= { ibmiSystem 99 }
+
+ibm          OBJECT IDENTIFIER ::= { enterprises 2 }
+ibmProd      OBJECT IDENTIFIER ::= { ibm 6 }
+ibmiProd4    OBJECT IDENTIFIER ::= { ibmProd 4 }
+ibmiSystem   OBJECT IDENTIFIER ::= { ibmiProd4 5 }
+
+ibmiSystemCpuUtil OBJECT-TYPE
+    SYNTAX      Gauge32
+    UNITS       "hundredths of a percent"
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION "Average utilisation of all processors in the partition,
+                 in hundredths of a percent (860 = 8.60%)."
+    ::= { ibmiSystem 1 }
+
+END
