Repository navigation
Conversation
Port the HMC check from datadog-unix-agent to integrations-core, updated for Python 3 and datadog_checks_base. The check connects to an IBM Hardware Management Console over SSH and collects lslparutil samples for every managed POWER system (LPAR, shared processor pools, memory pools, managed system memory) plus the HMC appliance's own memory and swap. Compared to the unix agent version, metric names are lowercased (hmc.LPAR.* -> hmc.lpar.*), the dead code paths (lshmc -V, /proc/stat, the debug-only custom command) are dropped, and the shared-tag and field-mutation bugs are fixed. Per-instance state is keyed by (host, port) so multiple HMC instances do not share sampling state.
✅ Dispatcher tests: passed
✅ 1 passed · nothing failed Batches · ✅ batch-01 1/1 Dispatcher finished on |
evalya-impact-summaryEvalya CI impact |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 574085c | Docs | View more details | Give us feedback! |
Disk usage changeCommit Uncompressed
Details
Compressed
Details
|
Follow the repo's ibm_* naming convention (ibm_ace, ibm_db2, ibm_i, ibm_mq, ibm_was, ibm_spectrum_lsf): the check, package, config directory and metric prefix all become ibm_hmc (ibm_hmc.lpar.*, ibm_hmc.can_connect). Since the metric names were already renamed from the unix agent's hmc.LPAR.* form, there is no continuity left to preserve, so the check is renamed as well before its first integrations-core release. Declared AIX only, like lparstats: platforms = aix in .ddev/config.toml keeps it out of the Linux/Windows/macOS Agent builds (the AIX Agent build is not driven by that list). Unit tests still run on Linux CI with mocked SSH, like lparstats.
Follow the lparstats pattern: the Supported OS::AIX classifier tag in manifest.json keeps the check out of the Linux/Windows/macOS Agent builds, and the display name and metrics prefix also come from the manifest. Drop the now-redundant .ddev/config.toml overrides. Manifests are being phased out repo-wide; maintainers can move to the .ddev/config.toml declarations when this integration's manifest is removed along with the rest.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7518fd93f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Two critical correctness issues stand out: a global max() over lslparutil rows permanently drops metrics for all but one LPAR per managed system, and the initial bootstrap query uses Agent-local time rather than HMC-local time, preventing collection entirely when the two are in different timezones. Additional issues include truncated multi-digit HMC version numbers (V10 misidentified as older than V7), missing instance tags on managed-system metrics, processor-pool metrics lacking a pool-ID tag, a known-hosts documentation mismatch that breaks fresh installs, and silent swallowing of lssyscfg command failures.
🤖 Bits Code Review · Commit 7518fd9
Collapsing the *RM version into a truncated integer turned HMC 10 releases like V10R3.1060.0 into 103, below every 7.x field threshold, so HMC 10 systems would silently collect no version-gated LPAR metrics. Parse V<major>R<minor>.<patch> into a (major, minor, patch) tuple and compare component-wise, which also matches how HMC 10 versions are actually formatted.
… status - collect_subsystem kept only the single newest sample row, so managed systems with several LPARs reported only one partition; keep the newest sample per series instead (per LPAR, per shared processor pool) - managed-system metrics dropped the instance tags (hmc-instance and user tags); build the server tags from the instance tags - shared_proc_pool_id was submitted as a gauge, so distinct processor pools could not form separate series; submit it as a tag - the first lslparutil collection window came from the Agent clock, so an Agent in a different time zone never started collecting; bootstrap from the HMC's own clock via date - a failed lssyscfg discovery returned an empty inventory, wiping the known servers for an hour; check command exit status and keep the inventory on failure (also for lslparutil, meminfo and monhmc) - replace the ibm_hmc.can_connect service check with a gauge, per repository policy for new integrations
janine-c
left a comment
There was a problem hiding this comment.
Looks great! Just some writing suggestions that are a combination of both things I noticed and things Claude flagged.
| ibm_hmc.system.memory.active,gauge,,,,Amount of active memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active memory, | ||
| ibm_hmc.system.memory.active_anon,gauge,,,,Amount of active anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active anon memory, | ||
| ibm_hmc.system.memory.active_file,gauge,,,,Amount of active file cache memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active file memory, | ||
| ibm_hmc.system.memory.anonhugepages,gauge,,,,Amount of memory used by anonymous huge pages on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance huge pages, | ||
| ibm_hmc.system.memory.anonpages,gauge,,,,Amount of anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance anon memory, | ||
| ibm_hmc.system.memory.buffers,gauge,,,,Amount of buffer memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance buffers, | ||
| ibm_hmc.system.memory.cached,gauge,,,,Amount of cached memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance cached, | ||
| ibm_hmc.system.memory.commitlimit,gauge,,,,Current commit limit on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance commit limit, | ||
| ibm_hmc.system.memory.committed_as,gauge,,,,Total memory allocated on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance committed memory, | ||
| ibm_hmc.system.memory.dirty,gauge,,,,Amount of memory waiting to be written back to disk on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance dirty memory, | ||
| ibm_hmc.system.memory.inactive,gauge,,,,Amount of inactive memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive memory, | ||
| ibm_hmc.system.memory.inactive_anon,gauge,,,,Amount of inactive anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive anon memory, | ||
| ibm_hmc.system.memory.inactive_file,gauge,,,,Amount of inactive file cache memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive file memory, | ||
| ibm_hmc.system.memory.mapped,gauge,,,,Amount of memory used for mapped files on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance mapped memory, | ||
| ibm_hmc.system.memory.memfree,gauge,,,,Amount of free memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance free memory, | ||
| ibm_hmc.system.memory.memtotal,gauge,,,,Total amount of memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance total memory, | ||
| ibm_hmc.system.memory.pagetables,gauge,,,,Amount of memory used for page tables on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance page tables, | ||
| ibm_hmc.system.memory.shmem,gauge,,,,Amount of shared memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance shared memory, | ||
| ibm_hmc.system.memory.slab,gauge,,,,Amount of slab memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance slab memory, | ||
| ibm_hmc.system.memory.swap.cached,gauge,,,,Amount of cached swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap cached, | ||
| ibm_hmc.system.memory.swap.free,gauge,,,,Amount of free swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap free, | ||
| ibm_hmc.system.memory.swap.total,gauge,,,,Total amount of swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap total, | ||
| ibm_hmc.system.memory.swap.used,gauge,,,,Amount of used swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap used, | ||
| ibm_hmc.system.memory.swapfree,gauge,,,,Amount of free swap reported by /proc/meminfo on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swapfree, | ||
| ibm_hmc.system.memory.swaptotal,gauge,,,,Total amount of swap reported by /proc/meminfo on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swaptotal, | ||
| ibm_hmc.system.memory.vmallocused,gauge,,,,Amount of vmalloc memory in use on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance vmalloc used, | ||
| ibm_hmc.system.memory.writeback,gauge,,,,Amount of memory being written back to disk on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance writeback, |
There was a problem hiding this comment.
These values are submitted as-is from /proc/meminfo (kB) and monhmc -r swap (k), so they need a unit to display correctly in graphs.
| ibm_hmc.system.memory.active,gauge,,,,Amount of active memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active memory, | |
| ibm_hmc.system.memory.active_anon,gauge,,,,Amount of active anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active anon memory, | |
| ibm_hmc.system.memory.active_file,gauge,,,,Amount of active file cache memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active file memory, | |
| ibm_hmc.system.memory.anonhugepages,gauge,,,,Amount of memory used by anonymous huge pages on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance huge pages, | |
| ibm_hmc.system.memory.anonpages,gauge,,,,Amount of anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance anon memory, | |
| ibm_hmc.system.memory.buffers,gauge,,,,Amount of buffer memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance buffers, | |
| ibm_hmc.system.memory.cached,gauge,,,,Amount of cached memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance cached, | |
| ibm_hmc.system.memory.commitlimit,gauge,,,,Current commit limit on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance commit limit, | |
| ibm_hmc.system.memory.committed_as,gauge,,,,Total memory allocated on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance committed memory, | |
| ibm_hmc.system.memory.dirty,gauge,,,,Amount of memory waiting to be written back to disk on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance dirty memory, | |
| ibm_hmc.system.memory.inactive,gauge,,,,Amount of inactive memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive memory, | |
| ibm_hmc.system.memory.inactive_anon,gauge,,,,Amount of inactive anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive anon memory, | |
| ibm_hmc.system.memory.inactive_file,gauge,,,,Amount of inactive file cache memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive file memory, | |
| ibm_hmc.system.memory.mapped,gauge,,,,Amount of memory used for mapped files on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance mapped memory, | |
| ibm_hmc.system.memory.memfree,gauge,,,,Amount of free memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance free memory, | |
| ibm_hmc.system.memory.memtotal,gauge,,,,Total amount of memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance total memory, | |
| ibm_hmc.system.memory.pagetables,gauge,,,,Amount of memory used for page tables on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance page tables, | |
| ibm_hmc.system.memory.shmem,gauge,,,,Amount of shared memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance shared memory, | |
| ibm_hmc.system.memory.slab,gauge,,,,Amount of slab memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance slab memory, | |
| ibm_hmc.system.memory.swap.cached,gauge,,,,Amount of cached swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap cached, | |
| ibm_hmc.system.memory.swap.free,gauge,,,,Amount of free swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap free, | |
| ibm_hmc.system.memory.swap.total,gauge,,,,Total amount of swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap total, | |
| ibm_hmc.system.memory.swap.used,gauge,,,,Amount of used swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap used, | |
| ibm_hmc.system.memory.swapfree,gauge,,,,Amount of free swap reported by /proc/meminfo on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swapfree, | |
| ibm_hmc.system.memory.swaptotal,gauge,,,,Total amount of swap reported by /proc/meminfo on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swaptotal, | |
| ibm_hmc.system.memory.vmallocused,gauge,,,,Amount of vmalloc memory in use on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance vmalloc used, | |
| ibm_hmc.system.memory.writeback,gauge,,,,Amount of memory being written back to disk on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance writeback, | |
| ibm_hmc.system.memory.active,gauge,,kibibyte,,Amount of active memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active memory, | |
| ibm_hmc.system.memory.active_anon,gauge,,kibibyte,,Amount of active anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active anon memory, | |
| ibm_hmc.system.memory.active_file,gauge,,kibibyte,,Amount of active file cache memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance active file memory, | |
| ibm_hmc.system.memory.anonhugepages,gauge,,kibibyte,,Amount of memory used by anonymous huge pages on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance huge pages, | |
| ibm_hmc.system.memory.anonpages,gauge,,kibibyte,,Amount of anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance anon memory, | |
| ibm_hmc.system.memory.buffers,gauge,,kibibyte,,Amount of buffer memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance buffers, | |
| ibm_hmc.system.memory.cached,gauge,,kibibyte,,Amount of cached memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance cached, | |
| ibm_hmc.system.memory.commitlimit,gauge,,kibibyte,,Current commit limit on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance commit limit, | |
| ibm_hmc.system.memory.committed_as,gauge,,kibibyte,,Total memory allocated on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance committed memory, | |
| ibm_hmc.system.memory.dirty,gauge,,kibibyte,,Amount of memory waiting to be written back to disk on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance dirty memory, | |
| ibm_hmc.system.memory.inactive,gauge,,kibibyte,,Amount of inactive memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive memory, | |
| ibm_hmc.system.memory.inactive_anon,gauge,,kibibyte,,Amount of inactive anonymous memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive anon memory, | |
| ibm_hmc.system.memory.inactive_file,gauge,,kibibyte,,Amount of inactive file cache memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance inactive file memory, | |
| ibm_hmc.system.memory.mapped,gauge,,kibibyte,,Amount of memory used for mapped files on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance mapped memory, | |
| ibm_hmc.system.memory.memfree,gauge,,kibibyte,,Amount of free memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance free memory, | |
| ibm_hmc.system.memory.memtotal,gauge,,kibibyte,,Total amount of memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance total memory, | |
| ibm_hmc.system.memory.pagetables,gauge,,kibibyte,,Amount of memory used for page tables on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance page tables, | |
| ibm_hmc.system.memory.shmem,gauge,,kibibyte,,Amount of shared memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance shared memory, | |
| ibm_hmc.system.memory.slab,gauge,,kibibyte,,Amount of slab memory on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance slab memory, | |
| ibm_hmc.system.memory.swap.cached,gauge,,kibibyte,,Amount of cached swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap cached, | |
| ibm_hmc.system.memory.swap.free,gauge,,kibibyte,,Amount of free swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap free, | |
| ibm_hmc.system.memory.swap.total,gauge,,kibibyte,,Total amount of swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap total, | |
| ibm_hmc.system.memory.swap.used,gauge,,kibibyte,,Amount of used swap on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swap used, | |
| ibm_hmc.system.memory.swapfree,gauge,,kibibyte,,Amount of free swap reported by /proc/meminfo on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swapfree, | |
| ibm_hmc.system.memory.swaptotal,gauge,,kibibyte,,Total amount of swap reported by /proc/meminfo on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance swaptotal, | |
| ibm_hmc.system.memory.vmallocused,gauge,,kibibyte,,Amount of vmalloc memory in use on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance vmalloc used, | |
| ibm_hmc.system.memory.writeback,gauge,,kibibyte,,Amount of memory being written back to disk on the HMC appliance.,0,ibm_hmc,ibm_hmc appliance writeback, |
| @@ -0,0 +1,56 @@ | |||
| metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric | |||
| ibm_hmc.lpar.capped_cycles,gauge,,,,Number of cycles consumed while the LPAR was capped.,0,ibm_hmc,ibm_hmc lpar capped cycles, | |||
| ibm_hmc.lpar.curr_io_entitled_mem,gauge,,,,Current I/O entitled memory of the LPAR.,0,ibm_hmc,ibm_hmc lpar io entitled memory, | |||
There was a problem hiding this comment.
The memory fields from lslparutil (curr_io_entitled_mem, curr_mem, mapped_io_entitled_mem, mem_overage_cooperation, phys_run_mem, the mempool.* metrics, and the sys.* memory metrics) have no unit_name. If lslparutil reports them in MB, can you set unit_name to mebibyte for these rows?
| ibm_hmc.pool.total_pool_cycles,gauge,,,,Total cycles of the shared processor pool.,0,ibm_hmc,ibm_hmc pool total cycles, | ||
| ibm_hmc.pool.utilized_pool_cycles,gauge,,,,Utilized cycles of the shared processor pool.,0,ibm_hmc,ibm_hmc pool utilized cycles, | ||
| ibm_hmc.procpool.shared_proc_pool_id,gauge,,,,ID of the shared processor pool.,0,ibm_hmc,ibm_hmc procpool id, | ||
| ibm_hmc.procpool.total_pool_cycles,gauge,,,,Total cycles of the dedicated processor pool.,0,ibm_hmc,ibm_hmc procpool total cycles, |
There was a problem hiding this comment.
The README groups ibm_hmc.procpool.* under shared processor pool statistics, and line 24 describes this as the shared processor pool. Should these two descriptions say "shared processor pool" instead of "dedicated processor pool"?
| ibm_hmc.lpar.curr_io_entitled_mem,gauge,,,,Current I/O entitled memory of the LPAR.,0,ibm_hmc,ibm_hmc lpar io entitled memory, | ||
| ibm_hmc.lpar.curr_mem,gauge,,,,Current memory of the LPAR.,0,ibm_hmc,ibm_hmc lpar memory, | ||
| ibm_hmc.lpar.curr_proc_units,gauge,,,,Current entitled processor units of the LPAR.,0,ibm_hmc,ibm_hmc lpar processor units, | ||
| ibm_hmc.lpar.curr_procs,gauge,,,,Current virtual processors of the LPAR.,0,ibm_hmc,ibm_hmc lpar processors, |
There was a problem hiding this comment.
| ibm_hmc.lpar.curr_procs,gauge,,,,Current virtual processors of the LPAR.,0,ibm_hmc,ibm_hmc lpar processors, | |
| ibm_hmc.lpar.curr_procs,gauge,,,,Current number of virtual processors of the LPAR.,0,ibm_hmc,ibm_hmc lpar processors, |
| The check connects to the HMC appliance over SSH and runs `lslparutil` on it, | ||
| so it can run on any host that can reach the HMC: an AIX LPAR, a Linux box, or | ||
| anywhere else the Datadog Agent runs. | ||
|
|
||
| **This check is only shipped with the Agent for AIX.** |
There was a problem hiding this comment.
| The check connects to the HMC appliance over SSH and runs `lslparutil` on it, | |
| so it can run on any host that can reach the HMC: an AIX LPAR, a Linux box, or | |
| anywhere else the Datadog Agent runs. | |
| **This check is only shipped with the Agent for AIX.** | |
| The check connects to the HMC appliance over SSH and runs `lslparutil` on it. | |
| The check can run on any host that can reach the HMC, such as an AIX LPAR or a | |
| Linux host, but it is only shipped with the Agent for AIX. |
| description: | | ||
| Some older HMC appliances only support SHA1 encryption and do not advertise it | ||
| to SSH clients, which assume SHA2 and fail to connect. Enable this to force the | ||
| SSH client to use SHA1. Upgrading the HMC firmware is recommended instead. |
There was a problem hiding this comment.
| SSH client to use SHA1. Upgrading the HMC firmware is recommended instead. | |
| SSH client to use SHA1. Datadog recommends upgrading the HMC firmware instead. |
| ## @param force_sha1 - boolean - optional - default: false | ||
| ## Some older HMC appliances only support SHA1 encryption and do not advertise it | ||
| ## to SSH clients, which assume SHA2 and fail to connect. Enable this to force the | ||
| ## SSH client to use SHA1. Upgrading the HMC firmware is recommended instead. |
There was a problem hiding this comment.
| ## SSH client to use SHA1. Upgrading the HMC firmware is recommended instead. | |
| ## SSH client to use SHA1. Datadog recommends upgrading the HMC firmware instead. |
| # force_sha1: false | ||
|
|
||
| ## @param tags - list of strings - optional | ||
| ## A list of tags to attach to every metric and service check emitted by this instance. |
There was a problem hiding this comment.
| ## A list of tags to attach to every metric and service check emitted by this instance. | |
| ## A list of tags to attach to every metric and service check this instance emits. |
| ``` | ||
|
|
||
| If the Agent user's known hosts file does not contain the HMC's host key | ||
| yet, add it with `ssh-keyscan <HMC HOSTNAME> >> ~/.ssh/known_hosts`, run as |
There was a problem hiding this comment.
| yet, add it with `ssh-keyscan <HMC HOSTNAME> >> ~/.ssh/known_hosts`, run as | |
| yet, add it with `ssh-keyscan <HMC HOSTNAME> >> ~/.ssh/known_hosts`, and run as |
| The `lslparutil` start options are expressed in HMC-local time, so the check | ||
| queries the HMC's clock for its first collection window and keeps track of | ||
| the HMC-side time of the last collected sample afterwards. The Agent's time | ||
| zone and clock skew therefore do not affect collection; only keep the HMC | ||
| itself reasonably in sync (NTP) so samples are produced with sane timestamps. |
There was a problem hiding this comment.
| The `lslparutil` start options are expressed in HMC-local time, so the check | |
| queries the HMC's clock for its first collection window and keeps track of | |
| the HMC-side time of the last collected sample afterwards. The Agent's time | |
| zone and clock skew therefore do not affect collection; only keep the HMC | |
| itself reasonably in sync (NTP) so samples are produced with sane timestamps. | |
| The check selects `lslparutil` samples with `--startyear/--startmonth/...` options expressed in HMC-local time, and submits only samples newer than the previous collection. Synchronize the clocks of the Agent host and the HMC; for example, with Network Time Protocol (NTP), so the check doesn't miss samples or fetch them more than once. |
Validation Report
Run Passed validations (21)
|
What does this PR do?
Ports the HMC check from datadog-unix-agent to integrations-core as
ibm_hmc(AIX only), like lparstats (#23451). The rename follows the repo'sibm_*convention; the metric names were already normalized (below), so no continuity was left to preserve. It connects to an HMC over SSH and:lssyscfg -r sys), theirlslparutilsample rate, and the HMC version (lshmc -v, as a tuple so HMC 10 majors compare correctly)lslparutilsamples per subsystem (LPAR, POOL, PROCPOOL, MEMPOOL, SYS), submitting the newest unseen sample per series (per LPAR, per shared pool), throttled at each system's rate/proc/meminfo) and swap (monhmc)ibm_hmc.can_connectgauge (1/0) instead of a service checkDeliberate changes vs the unix agent check:
ibm_hmc: metricshmc.LPAR.*->ibm_hmc.lpar.*, config diribm_hmc.d/; thehmc.can_connectservice check became a metricSupported OS::AIXtag inmanifest.json(out of the Linux/Windows/macOS Agent builds)server:;shared_proc_pool_idtags pool series instead of a gaugedate), so an Agent in another time zone still collectslshmc -V,cat /proc/stat, debugcustomcommand, CoD); fixed tag/field-list mutation, delete-while-iterating, cross-instance state sharing (keyed by host/port)force_sha1(as in ssh_check) for older HMC firmwareTests mock
paramiko.SSHClientwith a fake HMC generating time-relativelslparutilsamples: normal collection, multi-LPAR/multi-pool, throttling, HMC 10 parsing, version fallback, HMC-clock bootstrap, failed commands, unreadable sample rate, malformed rows, and connection failure. They run on Linux CI like lparstats.Motivation
Migrate the remaining POWER-related checks from the unix agent into integrations-core, following lparstats (#23451). The check runs from any host with SSH access to the HMC but ships with the AIX Agent only. Validated on Linux with mocked output; testing against a real HMC before release is recommended.
Checklist before requesting review