Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-RubrikReport doesn't retrive results #692

Closed
KavyaKanya opened this issue Sep 20, 2020 · 9 comments · Fixed by #714
Closed

Get-RubrikReport doesn't retrive results #692

KavyaKanya opened this issue Sep 20, 2020 · 9 comments · Fixed by #714
Assignees

Comments

@KavyaKanya
Copy link

KavyaKanya commented Sep 20, 2020

No description provided.

@KavyaKanya
Copy link
Author

I've imported the Rubrik Module and able to run commands but all the commands related to Get-RubrikReport retrieve same results

image

I've been trying to get the detailed result set of Protection Tasks Summary view as per the UI view like below but none of commands get the detalied result set

image

This below complete result set view I'd want via PowerShell command

image

@jaapbrasser jaapbrasser self-assigned this Sep 21, 2020
@jaapbrasser
Copy link
Contributor

jaapbrasser commented Sep 21, 2020

Hello @KavyaKanya,

I think this is a case where we could've provided better documentation, as Get-RubrikReport gets information about the reports, and Get-RubrikReportData is used to retrieve the information from these reports.

I have just pushed an update to the documentation which includes your specific example:

Get-RubrikReport -Name 'Protection Tasks Details' | Get-RubrikReportData | Select-Object -ExpandProperty DatagridObject

This will get the individual tasks, which you highlighted in the GUI. Let me know if that resolves your issue!

image

@KavyaKanya
Copy link
Author

KavyaKanya commented Sep 21, 2020

Hello Jaap Brasser

Thanks a ton for the prompt response

1st question: Are the below set of commands giving us the same output

Get-RubrikReport -Name ‘Protection Tasks Details’ | Export-RubrikReport
Get-RubrikReport -Name 'Protection Tasks Details' | Get-RubrikReportData | Select-Object -ExpandProperty DatagridObject

(1st one via URL with CSV placed in the URL path and 2nd one giving the putput in the console is that the only difference?)

2nd question: I've made an observation comparing the no.of entries in the CSV via output from the below two set of commands

Get-RubrikReport -Name ‘Protection Tasks Details’ | Export-RubrikReport (like below screenshot below) - this command gives entries of 754 (entries within the CSV)

image

I've tried to extract the report from the UI like below screenshot - which gives me 559 entries within the CSV

image

@jaapbrasser
Copy link
Contributor

I have tried to reproduce the behavior by running the commands and the only difference I could find is that the following will return the duration in milliseconds instead of seconds in both CSV options:

Get-RubrikReport -Name 'Protection Tasks Details' | Get-RubrikReportData | Select-Object -ExpandProperty DatagridObject

I get the same amount of lines and did a comparison between the output of the following 3 methods:

  • Download from GUI
  • Download through PowerShell Module
  • Use Get-RubrikReportData to show or export data to csv

And I found that all return the same results. If you run the following command, how many results are returned?

Get-RubrikReport -Name 'Protection Tasks Details' | Get-RubrikReportData | Select-Object -ExpandProperty DatagridObject | Measure-Object

@KavyaKanya
Copy link
Author

KavyaKanya commented Sep 21, 2020

I've run the command as suggested which retrieved 753 entries

image

Or may be as per my team we have 4 nodes (IP1 IP2 IP3 IP4) but stated that accessing via one IP suppose IP1 (GUI login) it does have the complete data wrt to rest of the nodes

Ironically the GUI as per above to above screenshot which shows 753 and the recent command you suggested which I ran (Measure-Object) also gives 753 entries but CSV extracted from the GUI has less entries

@jaapbrasser
Copy link
Contributor

I would agree that that's a bit odd, because the GUI does indicate that there are exactly 753 tasks, so I would say 753 should be the correct amount of tasks.

Depending on how familiar you are with Chrome Dev Tools, could you open Chrome Dev Tools and check the network tab which exact URI is being with for the csv_link endpoint? All I can think of is that there is a difference there.

@KavyaKanya
Copy link
Author

KavyaKanya commented Sep 21, 2020

yaaa! :D

I've checked the Chrome Dev Tools and please find the below details

image

1af913f6-6ad9-421b-bbf7-069a20e36a91_1335aadf-0501-4310-8582-33c9ca41b291.csv

As per the command this is below URI

image

1af913f6-6ad9-421b-bbf7-069a20e36a91_d1d5b590-49c9-40db-a674-b3b9464dae64.csv

So there's that difference!

So how to go about the command retrives the exact content as per the no.of tasks viewed via GUI but the CSV URI not in sysnc to command output CSV URI

@KavyaKanya
Copy link
Author

Hello Jaap Brasser

Get-RubrikReport -Name 'Protection Tasks Details' | Get-RubrikReportData | Select-Object -ExpandProperty DatagridObject

so the above command is listing all the content like below

===========
TaskStatus : Succeeded
TaskType : Archival
ObjectId : Fileset:::be1f674c-be03-4cfa-b911-66f314b1d879
ObjectName : Data Group D
ObjectType : WindowsFileset
ObjectState : Active
Location : PRWFS02.prw.app.com
SlaDomainId : 916de28f-1c14-455e-8312-b7bba1532d32
SlaDomain : QNAP
SlaDomainState : Active
StartTime : 2020-09-21 17:33:53
EndTime : 2020-09-21 17:35:12
Duration : 79758
DataTransferred : 727273103
DataStored : 727273103

how can I get for each Location value I want to get rest items (like Start Time End Time SLA Domain)

so give an example something like below in Netbackup PS command how can I do the same for Rubrik

$apptasks = Get-NetBackupJob -Full -TimeStamp ((Get-Date).AddMinutes(-1440))|Where-Object {($.jobtype -match '0') -or ($.jobtype -match '28')}
$apptasksok1 = $apptasks.jobid

passing all the jobid's once by one for each of jobid getting status,end time,start time

============
$nametask = Get-NetBackupJob -JobId (PS command) "$jobid" (
$nametask1 = $nametask.status (trying to get the status for the "$jobid" passed)

how can it be done or PS command to get the same analogous result for Rubrik too

@KavyaKanya
Copy link
Author

I also get the below error when I set the set of command to get the rest items against that particular Object name value 'Master DB'

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants