feat(os/aix/snmp): add memory monitoring mode via hrStorageTable#6008
feat(os/aix/snmp): add memory monitoring mode via hrStorageTable#6008senbonzak wants to merge 1 commit intocentreon:developfrom
Conversation
7edda46 to
5a8a42b
Compare
|
Hello @senbonzak The $ should make the plugin ignore the It seem the ram is considered as a disk, and this mode should allow you to monitor most value in this table. If the percentage is wrong, please try to play with Thanks, |
|
Hi, thanks for the suggestion! I tested both approaches on the same AIX host (60 GB RAM, SNMP v1) and here are the results: Storage mode (your suggestion): Memory mode (this PR): Both modes return identical values. They both read the same However, I believe the dedicated 1. There is currently no memory monitoring for AIX in the official connector Looking at the official Centreon documentation for the AIX SNMP connector (https://docs.centreon.com/pp/integrations/plugin-packs/procedures/operatingsystems-aix-snmp/), there is no This means that today, a Centreon user who wants to monitor physical RAM on an AIX server has no native, explicit solution. The only workaround is using 2. Usability and consistency Using I think adding a dedicated memory mode is ultimately simpler for end users than documenting a Thanks again for your feedback! |
- Extends centreon::plugins::templates::counter following swap.pm conventions - Walks hrStorageTable dynamically to identify RAM entry by hrStorageType OID - AIX exposes RAM as hrStorageRam (.1.3.6.1.2.1.25.2.1.2) with dynamic index - No fixed index assumption -- works across all AIX versions and configurations - Tested on AIX 7.x production infrastructure
5a8a42b to
4f14bd0
Compare
Description
Add a new
memorymode to theos::aix::snmpplugin to monitor physical RAMusage on AIX servers via SNMP HOST-RESOURCES-MIB.
The existing modes cannot monitor RAM on AIX because AIX SNMP agents expose RAM
under
hrStorageType = hrStorageRam(.1.3.6.1.2.1.25.2.1.2) with a dynamicindex that must be discovered by scanning the full
hrStorageTable. This modehandles that discovery automatically.
Type of change
How this pull request can be tested ?
Requirements:
Command:
/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=os::aix::snmp::plugin --mode=memory --hostname=<AIX_IP> --snmp-version=2c --snmp-community= --warning-usage=80 --critical-usage=90
Expected output:
CRITICAL: Ram Total: 90.00 GB Used: 82.81 GB (92.02%) Free: 7.19 GB (7.98%)
| 'memory_used'=88920719360B;... 'memory_free'=7715979264B;... 'memory_usage'=92.02%;80;90;0;100
SNMP data (hrStorageTable extract):
HOST-RESOURCES-MIB::hrStorageType.21 = OID: HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageAllocationUnits.21 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.21 = INTEGER: 16777216
HOST-RESOURCES-MIB::hrStorageUsed.21 = INTEGER: 16576949
Note: the RAM index (here
.21) is dynamic and varies across AIX systems.Checklist
Summary by Aikido
🚀 New Features
More info