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

Redfish API to evaluate DELL R840 Lifcycle logs for error code MEM0802/MEM0804 #117

Open ashokbeh opened 2 years ago

ashokbeh commented 2 years ago

Hi,

Would appreciate if we can be helped with Redfish API that can evaluate Lifecycle logs for iDRAC9 on error codes MEM0802/MEM0804.

anupamaloke commented 2 years ago

@ashokbeh, I know this is a pretty late response. If you are looking to query LC log with a specific Message ID (such as for e.g. MEM0802 or MEM0804), then you can use something like below:

  tasks:
  - name: Get LC log with message ID MEM0802
    ansible.builtin.uri:
      url: "https://{{ inventory_hostname }}/redfish/v1/Managers/iDRAC.Embedded.1/LogServices/Lclog/Entries?$filter=MessageId%20eq%20%27MEM0802%27"
      user: "{{ user }}"
      password: "{{ password }}"
      headers:
        Accept: "application/json"
        OData-Version: "4.0"
      validate_certs: no
      force_basic_auth: yes
    register: result