create_service_event – Creates or lists serviceable events on the Hardware Management Console (HMC)

Synopsis

Creates a serviceable event on the Hardware Management Console (HMC) to report a problem that occurred on either the managed system or the HMC itself, and initiates a service request for repair.

Lists serviceable events available on the HMC.

Requirements

The below requirements are needed on the host that executes this module.

  • Python >= 3.9

Parameters

hmc_host (True, str, None)

The IP Address or hostname of the HMC.

hmc_auth (True, dict, None)

Username and Password credential of the HMC.

username (True, str, None)

Username of the HMC to login.

password (optional, str, None)

Password of the HMC.

system_name (optional, str, None)

The name or MTMS (machine type model serial) of the managed system.

Required for state=created except with hmctest.

Optional for state=facts.

description (optional, str, None)

The problem description.

Required when state=created.

types (optional, str, None)

The type of event to create.

power to report a problem with the power subsystem of managed-system.

processor to report a problem with hardware in the processor subsystem of managed-system.

lan to report a problem with the local area network (LAN) to which managed-system is attached.

software to report a problem with an operating system or other software loaded on managed-system.

io to report a problem with hardware in the I/O configuration of managed-system.

other to report a problem with managed-system that is not adequately described by any other event type.

hmc to report a problem with this HMC.

test to test whether problems can be reported for managed-system.

hmctest to test whether problems can be reported for this HMC.

sys to report a problem with managed-system.

vios to report a problem with a Virtual I/O Server on managed-system.

lpm to report a partition migration problem where managed-system is the source system for the partition migration operation.

cloudconn to report a problem with the cloud connector on this HMC.

aix to report a problem with an AIX partition on managed-system.

novalink to report a problem with PowerVM NovaLink.

attributes (optional, dict, None)

The serviceable event attributes to set.

The attribute data consists of name/value pairs.

Required with aix, cloudconn, lpm, novalink, sys, and vios.

Also required with hmc on POWER11 systems.

Otherwise this option is not valid.

title (True, str, None)

Title for the serviceable event.

severity (True, int, None)

The priority for the serviceable event.

Valid values are 1 - 4.

contact_name (True, str, None)

The contact name for the serviceable event.

contact_email (True, str, None)

The contact email for the serviceable event.

contact_phone (True, int, None)

The contact phone number for the serviceable event.

target_lpar_name (optional, str, None)

The target logical partition name for the serviceable event.

Required with lpm.

target_mtms (optional, str, None)

The target managed system MTMS for the serviceable event.

Required with lpm.

Format is tttt-mmm*sssssss.

lpar_name (optional, str, None)

The logical partition name for the serviceable event.

Required with aix, lpm, and vios.

associated_entitled_mtms (optional, str, None)

The managed system MTMS used to register this virtual HMC for call home.

Required with hmc when this HMC is a virtual HMC.

Format is tttt-mmm*sssssss.

hostname (optional, str, None)

NovaLink hostname.

Required with novalink.

user (optional, str, None)

NovaLink user.

Required with novalink.

password (optional, str, None)

NovaLink password.

Required with novalink.

service_file (optional, list, None)

The name of the log file attached to the serviceable event.

Multiple service files must be comma-separated.

Required with aix, cloudconn, lpm, novalink, sys, and vios.

Also required with hmc on POWER11 systems.

aixffdc AIX system logs. Valid with aix.

aixsnap AIX snap data. Valid with aix.

lpmffdc Partition migration debug data. Valid with lpm.

novalinkffdc NovaLink pedbg data. Valid with novalink.

pedbgq4 HMC pedbg data. Valid with aix, hmc, lpm, sys, and vios.

pedbgq8 Cloud connector pedbg data. Valid with cloudconn.

rscdump Non-disruptive system dump. Valid with sys.

spdump Service processor dump. Valid with sys.

vios VIOS snap data. Valid with vios.

event_type (optional, str, None)

The type of events to list when state=facts.

hardware lists serviceable events.

console lists console events.

days (optional, int, None)

The number of days to go back and search for events when state=facts.

minutes (optional, int, None)

The number of minutes to go back and search for events when state=facts.

number_of_events (optional, int, None)

The number of events to display when state=facts.

display_attributes (optional, list, None)

List of hardware event attributes to display when state=facts.

Maps to lssvcevents -F.

state (True, str, None)

created to create a serviceable event.

facts to list serviceable events.

Notes

Note

  • This module requires the HMC which has systems licensed for advanced automation and monitoring.

  • The types aix, cloudconn, lpm, novalink, sys, and vios are supported for POWER11 systems only.

  • The types power, processor, lan, software, io, and other are supported for POWER10 and POWER9 systems only.

  • The types hmc, test, and hmctest are supported for all systems.

Examples

- name: Create a serviceable event for collection of vios logs
  create_service_event:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth: "{{ curr_hmc_auth }}"
    system_name: <system name>
    description: Test Description
    types: vios
    attributes:
      title: test
      severity: 4
      contact_name: Test
      contact_phone: < phone-num >
      contact_email: test@abc.com
      lpar_name: < partition >
      service_file:
        - pedbgq4
        - vios
    state: created

- name: Create a serviceable event for collection of lpm logs
  create_service_event:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth: "{{ curr_hmc_auth }}"
    system_name: <system name>
    description: Test Description
    types: lpm
    attributes:
      title: test
      severity: 4
      contact_name: Test
      contact_phone: < phone-num >
      contact_email: test@abc.com
      lpar_name: < partition1 >
      target_lpar_name: <partition2 >
      target_mtms: < target-sys >
      service_file:
        - pedbgq4
        - lpmffdc
    state: created

- name: List serviceable events
  create_service_event:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth: "{{ curr_hmc_auth }}"
    state: facts
    event_type: hardware

- name: List console events
  create_service_event:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth: "{{ curr_hmc_auth }}"
    state: facts
    event_type: console
    days: 7
    number_of_events: 10

Return Values

changed (always, bool, )

Indicates whether the serviceable event was created.

info (always, raw, )

Output of the serviceable event creation or list operation.

warning (when a warning is raised, str, )

Warning message, if any.

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by community.

Authors

  • Sreenidhi S(@SreenidhiS1)