Skip to content

Add ibm_hmc check (AIX only) - #25853

Open
pgimalac wants to merge 10 commits into
masterfrom
pgimalac/check-hmc
Open

pgimalac wants to merge 10 commits into
masterfrom
pgimalac/check-hmc

Conversation

@pgimalac

@pgimalac pgimalac commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

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's ibm_* convention; the metric names were already normalized (below), so no continuity was left to preserve. It connects to an HMC over SSH and:

  • discovers the managed POWER systems (lssyscfg -r sys), their lslparutil sample rate, and the HMC version (lshmc -v, as a tuple so HMC 10 majors compare correctly)
  • collects lslparutil samples 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
  • collects the HMC appliance's memory (/proc/meminfo) and swap (monhmc)
  • reports connectivity via the ibm_hmc.can_connect gauge (1/0) instead of a service check

Deliberate changes vs the unix agent check:

  • renamed to ibm_hmc: metrics hmc.LPAR.* -> ibm_hmc.lpar.*, config dir ibm_hmc.d/; the hmc.can_connect service check became a metric
  • AIX only, like lparstats, via the Supported OS::AIX tag in manifest.json (out of the Linux/Windows/macOS Agent builds)
  • managed-system metrics carry the instance tags plus server:; shared_proc_pool_id tags pool series instead of a gauge
  • the first collection window comes from the HMC clock (date), so an Agent in another time zone still collects
  • exit status is checked: a failed discovery keeps the inventory instead of wiping it for an hour; a failed subsystem command skips only that subsystem
  • dead code dropped (lshmc -V, cat /proc/stat, debug custom command, CoD); fixed tag/field-list mutation, delete-while-iterating, cross-instance state sharing (keyed by host/port)
  • adds force_sha1 (as in ssh_check) for older HMC firmware

Tests mock paramiko.SSHClient with a fake HMC generating time-relative lslparutil samples: 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

  • I self-reviewed the full diff, and this description matches the final change
  • Tests cover the change, or this description explains why none are needed
  • Automated review comments, including Codex review, were addressed or answered
  • I, the human author, understand this change and believe it meets the repository standards

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.
@dd-octo-sts

dd-octo-sts Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Dispatcher tests: passed

Dispatcher beta: informational only
Existing CI remains the merge signal.

  1/1 jobs

✅ 1 passed · nothing failed

Batches · ✅ batch-01 1/1

Dispatcher finished on 1e7420e — GitHub Run · Dispatcher Logs.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

evalya-impact-summary

Evalya CI impact

Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   4 (always emitted)
Changed files:   23

Full impact report
Learn more about CI impact filtering

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Pipelines  Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 87.56%
• Overall Coverage: 90.68%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 574085c | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Disk usage change

Commit 574085c compared against 7b332a4.

Uncompressed

linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
🔺 +28.59 KiB 🔺 +28.59 KiB 🔺 +28.59 KiB 🔺 +28.59 KiB 🔺 +28.59 KiB
Details
Name Version Type linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
ibm_hmc (NEW) 0.1.0 Integration 🔺 +28.59 KiB 🔺 +28.59 KiB 🔺 +28.59 KiB 🔺 +28.59 KiB 🔺 +28.59 KiB

Compressed

linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
🔺 +9.94 KiB 🔺 +9.94 KiB 🔺 +9.94 KiB 🔺 +9.94 KiB 🔺 +9.94 KiB
Details
Name Version Type linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64
ibm_hmc (NEW) 0.1.0 Integration 🔺 +9.94 KiB 🔺 +9.94 KiB 🔺 +9.94 KiB 🔺 +9.94 KiB 🔺 +9.94 KiB

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.
@pgimalac pgimalac changed the title Add hmc check Add ibm_hmc check (AIX only) Oct 30, 2026
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.
@pgimalac
pgimalac marked this pull request as ready for review October 30, 2026 17:54
@pgimalac
pgimalac requested a review from a team October 30, 2026 17:54
@pgimalac
pgimalac requested review from a team as code owners October 30, 2026 17:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T17:58:09.751717Z 7518fd9 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

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.

Open Bits AI session

🤖 Bits Code Review · Commit 7518fd9

Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
Comment thread ibm_hmc/README.md Resolved
Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
Comment thread ibm_hmc/datadog_checks/ibm_hmc/check.py Resolved
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 janine-c self-assigned this Oct 30, 2026

@janine-c janine-c left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just some writing suggestions that are a combination of both things I noticed and things Claude flagged.

Comment thread ibm_hmc/metadata.csv
Comment on lines +30 to +56
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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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,

Comment thread ibm_hmc/metadata.csv
@@ -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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread ibm_hmc/metadata.csv
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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"?

Comment thread ibm_hmc/metadata.csv
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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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,

Comment thread ibm_hmc/README.md
Comment on lines +8 to +12
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.**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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.

Comment thread ibm_hmc/README.md
```

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment thread ibm_hmc/README.md
Comment on lines +68 to +72
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@dd-octo-sts

dd-octo-sts Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Validation Report

Validation Description Status
pr-description Validate the pull request checklist and visible description length

To fix: Tick every item in .github/PULL_REQUEST_TEMPLATE.md and keep the description under 3,000 visible characters.
❌

Run ddev validate all changed --fix to attempt to auto-fix supported validations.

Passed validations (21)
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file ✅
ci Validate CI configuration and code coverage settings ✅
codeowners Validate every integration has a CODEOWNERS entry ✅
config Validate default configuration files against spec.yaml ✅
dep Verify dependency pins are consistent and Agent-compatible ✅
http Validate integrations use the HTTP wrapper correctly ✅
imports Validate check imports do not use deprecated modules ✅
integration-style Validate check code style conventions ✅
jmx-metrics Validate JMX metrics definition files and config ✅
labeler Validate PR labeler config matches integration directories ✅
legacy-signature Validate no integration uses the legacy Agent check signature ✅
license-headers Validate Python files have proper license headers ✅
licenses Validate third-party license attribution list ✅
metadata Validate metadata.csv metric definitions ✅
models Validate configuration data models match spec.yaml ✅
openmetrics Validate OpenMetrics integrations disable the metric limit ✅
package Validate Python package metadata, naming, and wheel contents ✅
qa-label Validate the pull request declares whether it needs QA for the next Agent release ✅
readmes Validate README files have required sections ✅
saved-views Validate saved view JSON file structure and fields ✅
version Validate version consistency between package and changelog ✅

View full run

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants