dell / redfish-ansible-module

Ansible modules for Out-Of-Band Controllers using Redfish APIs
GNU General Public License v3.0
197 stars 80 forks source link

Capture of DellR840 LC_logs #118

Open AnaghaNooji opened 2 years ago

AnaghaNooji commented 2 years ago

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:

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" ] } ] ]

anupamaloke commented 2 years ago

@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"
AnaghaNooji commented 2 years ago

@anupamaloke This helped me, thank you!

AnaghaNooji commented 2 years ago

@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