You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running Get-RubrikVM -Name melliott-lin | Get-RubrikEvent -AfterDate 8/12/19 -Verbose against one of our test clusters:
PS /Users/mattelliott/Documents/git/rubrik-sdk-for-powershell> Get-RubrikVM -Name melliott-lin | Get-RubrikEvent -AfterDate 8/12/19 -Verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikEvent
VERBOSE: Selected 1.0 API Data for Get-RubrikEvent
VERBOSE: Load API data for
VERBOSE: Description: Retrieve information for the latest of related events that match the value specified in any of the following categories: type, status, or ID, and limit events by date.
VERBOSE: Build the URI VERBOSE: URI = https://cluster-b-rr.rubrik.us/api/internal/event VERBOSE: Build the query parameters for object_ids,after_date,object_type,limit,event_type,event_series_id,object_name,status,after_id,show_only_latest,before_date,filter_only_on_latest VERBOSE: URI = https://cluster-b-rr.rubrik.us/api/internal/event?object_ids=VirtualMachine:::2af8fe5f-5b64-44dd-a9e0-ec063753b823-vm-5969&after_date=08/12/2019 00:00:00&limit=50&show_only_latest=False&filter_only_on_latest=False
VERBOSE: Submitting the request
VERBOSE: GET https://cluster-b-rr.rubrik.us/api/internal/event?object_ids=VirtualMachine:::2af8fe5f-5b64-44dd-a9e0-ec063753b823-vm-5969&after_date=08/12/2019 00:00:00&limit=50&show_only_latest=False&filter_only_on_latest=False with 0-byte payload
VERBOSE: received 27-byte response of content type application/json
VERBOSE: Received HTTP Status 200 VERBOSE: Formatting return value VERBOSE: Filter the results
VERBOSE: Build the URI
VERBOSE: URI = https://cluster-b-rr.rubrik.us/api/internal/event
VERBOSE: Build the query parameters for object_ids,after_date,object_type,limit,event_type,event_series_id,object_name,status,after_id,show_only_latest,before_date,filter_only_on_latest
VERBOSE: URI = https://cluster-b-rr.rubrik.us/api/internal/event?object_ids=VirtualMachine:::1226ff04-6100-454f-905b-5df817b6981a-vm-5969&after_date=08/12/2019 00:00:00&limit=50&show_only_latest=False&filter_only_on_latest=False
VERBOSE: Submitting the request
VERBOSE: GET https://cluster-b-rr.rubrik.us/api/internal/event?object_ids=VirtualMachine:::1226ff04-6100-454f-905b-5df817b6981a-vm-5969&after_date=08/12/2019 00:00:00&limit=50&show_only_latest=False&filter_only_on_latest=False with 0-byte payload
VERBOSE: received 38184-byte response of content type application/json
VERBOSE: Received HTTP Status 200 VERBOSE: Formatting return value VERBOSE: Filter the results hasMore data date
------- ---- ----
False {}
8/13/19 1:01:41 PM
8/13/19 1:01:41 PM
8/13/19 1:01:41 PM
8/13/19 1:01:41 PM
8/13/19 1:01:42 PM
8/13/19 1:01:42 PM
8/13/19 1:01:42 PM
8/13/19 1:01:42 PM
8/13/19 1:01:43 PM
8/13/19 1:01:59 PM
8/13/19 1:02:40 PM
8/13/19 1:02:40 PM
8/13/19 1:02:41 PM
8/13/19 1:02:41 PM
8/13/19 1:02:43 PM
8/13/19 1:02:43 PM
8/13/19 1:02:44 PM
8/13/19 1:02:44 PM
8/13/19 1:02:15 AM
8/13/19 1:02:15 AM
8/13/19 1:02:15 AM
8/13/19 1:02:15 AM
8/13/19 1:02:12 AM
8/13/19 1:02:12 AM
8/13/19 1:02:11 AM
8/13/19 1:02:11 AM
8/13/19 1:01:26 AM
8/13/19 1:01:10 AM
8/13/19 1:01:09 AM
8/13/19 1:01:09 AM
8/13/19 1:01:09 AM
8/13/19 1:01:09 AM
8/13/19 1:01:08 AM
8/13/19 1:01:08 AM
8/13/19 1:01:08 AM
8/13/19 1:01:07 AM
8/12/19 7:01:29 AM
8/12/19 7:01:29 AM
8/12/19 7:01:28 AM
8/12/19 7:01:28 AM
8/12/19 7:01:26 AM
8/12/19 7:01:26 AM
8/12/19 7:01:25 AM
8/12/19 7:01:25 AM
8/12/19 7:00:46 AM
8/12/19 7:00:30 AM
8/12/19 7:00:29 AM
8/12/19 7:00:29 AM
8/12/19 7:00:29 AM
8/12/19 7:00:29 AM
VERBOSE: Build the URI
VERBOSE: URI = https://cluster-b-rr.rubrik.us/api/internal/event
VERBOSE: Build the query parameters for object_ids,after_date,object_type,limit,event_type,event_series_id,object_name,status,after_id,show_only_latest,before_date,filter_only_on_latest
VERBOSE: URI = https://cluster-b-rr.rubrik.us/api/internal/event?object_ids=VirtualMachine:::4c0f0c71-1390-4017-9206-f8b16bd7ca8c-vm-5969&after_date=08/12/2019 00:00:00&limit=50&show_only_latest=False&filter_only_on_latest=False
VERBOSE: Submitting the request
VERBOSE: GET https://cluster-b-rr.rubrik.us/api/internal/event?object_ids=VirtualMachine:::4c0f0c71-1390-4017-9206-f8b16bd7ca8c-vm-5969&after_date=08/12/2019 00:00:00&limit=50&show_only_latest=False&filter_only_on_latest=False with 0-byte payload
VERBOSE: received 27-byte response of content type application/json
VERBOSE: Received HTTP Status 200 VERBOSE: Formatting return value VERBOSE: Filter the results False {}
Expected Behavior:
Cmdlet should display Event info as it does when not using -AfterDate parameter
Steps to Reproduce:
Please provide detailed steps for reproducing the issue.
I have taken a look at this issue, this seems to be caused by the default PowerShell behavior of displayings arrays, or multiple arrays of objects.
What happens in the console is that the output of the second array is determined by the output of the first array. So for example, using different cmdlets you can see the difference in output:
get-item /;get-process | select -first 1
get-item /
get-process | select -first 1
That being said, your issue does highlight two issues with the Get-RubrikEvent function as it behaves now. It should not be outputting the empty json response. And the Convert-APIDateTime function should only be called if the time field actually exists. I have created a branch and started work on resolving these issues.
Current Behavior:
Running
Get-RubrikVM -Name melliott-lin | Get-RubrikEvent -AfterDate 8/12/19 -Verbose
against one of our test clusters:Expected Behavior:
Cmdlet should display Event info as it does when not using -AfterDate parameter
Steps to Reproduce:
Please provide detailed steps for reproducing the issue.
Context:
Failure Logs
N/A
The text was updated successfully, but these errors were encountered: