Using the Bare Metal Orchestrator CLI, you can export events to a .tar file that you can then SFTP to an external site.
- You must have write permissions to run these commands. Contact your Bare Metal Orchestrator administrator.
- Ensure there is enough space on the target machine where you export the events.
Bare Metal Orchestrator stores up to 150 Mb of events (or approximately 150,000 events). You can set a page limit to define the number of events to include on each page that is downloaded, up to a maximum of 2,000 events on a page.
Collected events are saved in a JSON file with up to a maximum of 2,000 events in each. If you set a page limit of 2,000 events and your export results exceed 2,000 events, then multiple JSON files are included in the .tar file. For example: if the pull produces 4,000 events, then two JSON files with 2,000 events each are included in the .tar file.
The exported pages are saved in a bmoevents.tar file in the directory where the command is initiated.
The following are sample event entries in the extracted events.json file:
{
"result": [
{
"metric": {
"timestamp": "2023-02-01T21:40:26Z",
"eventType": "Warning",
"resourceType": "Server",
"resourceName": "dell-3",
"reason": "StatusUpdate",
"message": "1675287626278: dell-3 status changed: Failed while running operation: Initialize. Error -\u003e failed to initialize BMC rpc error: code = Unknown desc = Get \"https://10.45.45.14/redfish/v1/\": dial tcp 10.45.45.14:443: i/o timeout",
"site": "gc",
"status": "Failed",
"serverIP": "https://10.45.45.14",
"transactionProgress": "Initialize, Initialize, Initialize, Initialize, Initialize, (Initialize)",
"transactionID": "9774f876-4352-4153-8a7f-0ea5d72f8320",
"transactionState": "CompletedWithErrors",
"offset": "1754",
"source": "server-controller-gc",
"operation": "Initialize",
"profile": "hardwareprofile-dell"
}
},
{
"metric": {
"timestamp": "2023-02-01T21:38:24Z",
"eventType": "Normal",
"resourceType": "Server",
"resourceName": "dell-3",
"reason": "StatusUpdate",
"message": "1675287504241: dell-3 status changed: Busy for running operation: Initialize",
"site": "gc",
"status": "Busy",
"serverIP": "https://10.45.45.14",
"transactionProgress": "Initialize, Initialize, Initialize, Initialize, Initialize, (Initialize)",
"transactionID": "9774f876-4352-4153-8a7f-0ea5d72f8320",
"transactionState": "InProgress",
"offset": "1753",
"source": "server-controller-gc",
"operation": "Initialize",
"profile": "hardwareprofile-dell"
}
}
],
"total": 2
}
To export Bare Metal Orchestrator events:
- Establish a CLI session on the Bare Metal Orchestrator VM and log in. For high availability configurations, establish a CLI session using the virtual IP (VIP) of the Load Balancers for the Bare Metal Orchestrator cluster.
- Do one of the following:
-
Run the following command to export all events up to the default page limit of 1000:
bmo get events
-
Run one of the following commands to set the number of events to include on each page up to the maximum of 2,000 events:
bmo get events -p <numberofevents>
bmo get events --pagelimit <numberofevents>
where
<numberofevents>
is entered as an integer up to a maximum value of 2000. Do not include spaces or special characters.
-