dell/redfish-ansible-module

Capture of DellR840 LC_logs

Opened this issue · 3 comments

Hi,

The playbook (playbooks/manager/get_manager_logs.yml) gives info of the last 50 logs only and I want to pull out the entire LC log info, requesting your help on this.
Thanks in advance

task:

  • name: Get Manager Logs
    community.general.redfish_info:
    category: Manager
    command: GetLogs
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
    register: result

The output looks like this:
"messages_list": [
[
{
"Severity": "OK",
"Created": "2022-06-22T11:44:50+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:50+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:50+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:49+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:49+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 1 times.",
"MessageId": "LOG007",
"MessageArgs": [
""
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:49+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:48+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:48+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:48+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:48+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 2 times.",
"MessageId": "LOG007",
"MessageArgs": [
""
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:46+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully exported the ePSA Diagnostics results.",
"MessageId": "SYS085"
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The (installation or configuration) job JID_558982857791 is successfully completed.",
"MessageId": "JCP037",
"MessageArgs": [
"JID_558982857791"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The (installation or configuration) job JID_558982857791 is successfully created on iDRAC.",
"MessageId": "JCP027",
"MessageArgs": [
"JID_558982857791"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The operation ExportePSADiagnosticsResult of the DCIM_LCService was performed by ",
"MessageId": "USR107",
"MessageArgs": [
"ExportePSADiagnosticsResult",
"DCIM_LCService",
""
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 1 times.",
"MessageId": "LOG007",
"MessageArgs": [
"1"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:44+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:44:44+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 6 times.",
"MessageId": "LOG007",
"MessageArgs": [
"6"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:54+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:54+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 6 times.",
"MessageId": "LOG007",
"MessageArgs": [
"6"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:48+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:48+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 10 times.",
"MessageId": "LOG007",
"MessageArgs": [
"10"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:37+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:36+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully exported the ePSA Diagnostics results.",
"MessageId": "SYS085"
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:36+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The (installation or configuration) job JID_558978567735 is successfully completed.",
"MessageId": "JCP037",
"MessageArgs": [
"JID_558978567735"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:36+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The (installation or configuration) job JID_558978567735 is successfully created on iDRAC.",
"MessageId": "JCP027",
"MessageArgs": [
"JID_558978567735"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:36+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The operation ExportePSADiagnosticsResult of the DCIM_LCService was performed by ",
"MessageId": "USR107",
"MessageArgs": [
"ExportePSADiagnosticsResult",
"DCIM_LCService",
""
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:36+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 1 times.",
"MessageId": "LOG007",
"MessageArgs": [
"1"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:35+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:37:35+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 6 times.",
"MessageId": "LOG007",
"MessageArgs": [
"6"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:49+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:49+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 6 times.",
"MessageId": "LOG007",
"MessageArgs": [
"6"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:35+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:29+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:28+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully exported the ePSA Diagnostics results.",
"MessageId": "SYS085"
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:28+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The (installation or configuration) job JID_558976078277 is successfully completed.",
"MessageId": "JCP037",
"MessageArgs": [
"JID_558976078277"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:27+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The (installation or configuration) job JID_558976078277 is successfully created on iDRAC.",
"MessageId": "JCP027",
"MessageArgs": [
"JID_558976078277"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:27+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The operation ExportePSADiagnosticsResult of the DCIM_LCService was performed by ",
"MessageId": "USR107",
"MessageArgs": [
"ExportePSADiagnosticsResult",
"DCIM_LCService",
""
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:27+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 1 times.",
"MessageId": "LOG007",
"MessageArgs": [
"1"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:33:26+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:30:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:30:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:15:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:15:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:00:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:00:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T11:00:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "The previous log entry was repeated 6 times.",
"MessageId": "LOG007",
"MessageArgs": [
"6"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T10:59:46+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and WS-MAN.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"WS-MAN"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T10:45:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
},
{
"Severity": "OK",
"Created": "2022-06-22T10:45:45+00:00",
"EntryType": "Oem",
"OemRecordFormat": "Dell",
"Message": "Successfully logged in using , from and REDFISH.",
"MessageId": "USR0030",
"MessageArgs": [
"",
"",
"REDFISH"
]
}
]
]

@AnaghaNooji, if you want to pull in the entire Lifecycle Controller log and save it on a remote network share (CIFS, NFS) or as a local file, then check out the idrac_lifecycle_controller_logs module.

- name: Export lifecycle controller logs to NFS share.
  dellemc.openmanage.idrac_lifecycle_controller_logs:
    idrac_ip: "190.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    validate_certs: False
    share_name: "192.168.0.0:/nfsfileshare"
- name: Export lifecycle controller logs to CIFS share.

  dellemc.openmanage.idrac_lifecycle_controller_logs:
    idrac_ip: "190.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    validate_certs: False
    share_name: "\\\\192.168.0.2\\share"
    share_user: "share_user_name"
    share_password: "share_user_pwd"

- name: Export lifecycle controller logs to LOCAL path.
  dellemc.openmanage.idrac_lifecycle_controller_logs:
    idrac_ip: "190.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    validate_certs: False
    share_name: "/example/export_lc"

@anupamaloke This helped me, thank you!

@anupamaloke ERROR! couldn't resolve module/action 'dellemc.openmanage.idrac_lifecycle_controller_logs'. This often indicates a misspelling, missing collection, or incorrect module path.
It's throwing an error is it with the module?
I tried to export LC logs to the local path