Servers - General
1824982 Members
3732 Online
109678 Solutions
New Discussion юеВ

G2 PDU Clearing Logs with Redfish

 
fhon
Visitor

G2 PDU Clearing Logs with Redfish

With our G2 PDUs, we want to clear the logs with redfish. I'm assuming we can can clear the logs with a request to : /redfish/v1/Managers/1/LogServices/Log/Actions/LogService.Reset

However a POST request with no arguments does not work. I just get a "400 Bad Request" Does anyone know what arguments need to be sent with the request?

3 REPLIES 3
Vinky_99
Esteemed Contributor

Re: G2 PDU Clearing Logs with Redfish

@fhon 

Good day!

Typically, to clear logs using the LogService. Reset action, you would send a POST request to the appropriate URL, but you may need to include a request body with the necessary arguments or parameters. Unfortunately, the exact argument requirements can differ between different devices and firmware versions.

You can give a try to below ones:

>> Check the user manual for your G2 PDU device. It should provide information on how to interact with the Redfish API and the required parameters for the LogService.Reset action.You may find the Manuals in Support site: https://support.hpe.com/

>> The Redfish standard includes a schema that describes the available actions and their parameters for each resource. You can typically find the schema documentation for your Redfish implementation on the manufacturer's website. Look for information about the LogService.Reset action and its parameters.

>> Experiment with different arguments in the request body. For some devices, sending an empty JSON object as the request body might work, while others may require specific parameters to be set.

For example, you might try sending a POST request with an empty JSON object like this:

 

{}

 

Or you may need to specify additional parameters such as:

{
"Action": "LogService.Reset",
"Target": "/redfish/v1/Managers/1/LogServices/Log"
}

 

If you're unable to find the correct arguments or the device's documentation doesn't provide clear instructions, consider reaching out to the HPE Support for further assistance. 

Remember to ensure that you have the necessary permissions and authentication set up for making Redfish API requests to your device.

I hope this give some insights. Let me know.. 

These are my opinions so use it at your own risk.
ngnear
HPE Pro

Re: G2 PDU Clearing Logs with Redfish

You may also refer to the user guide for assistance and if needed, please do log a support case with us via https://support.hpe.com/

We'd be happy to assist.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
fhon
Visitor

Re: G2 PDU Clearing Logs with Redfish

Thank you for your help. Unfortunately the manual was not very helpful and the request didn't work with either the empty parameters or the ones you mentioned. I'm not getting the 400 error though so that's a step in the right direction. I'll continue to poke at it. Thanks again.