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

Explore DSC Report Server OData Issue #1

Open
Zuldan opened this issue Mar 24, 2016 · 5 comments

Comments

@Zuldan
Copy link

@Zuldan Zuldan commented Mar 24, 2016

Hi Doug, I'm trying to query a DSC Report Server using your tool but I'm not having any luck.

I'm getting Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (400) Bad Request."

https://mydscpullserver:8080/PSDSCPullServer.svc

if you want some code to quickly setup a Pull Server / Node with Report Server here is a sample https://gist.github.com/Zuldan/c679bae20de0c2dcf1aa

Any tips on how to use ODataExplorer with a DSC report server would be greatly appreciated.

On another note, it would be GREAT if you could write a blog post on how to extract reports from a DSC Report Server / OData (all nodes / per node status) and then dump the data into Excel with some fancy graphs or something ;-) It would be a great read for the whole community.

@dfinke

This comment has been minimized.

Copy link
Owner

@dfinke dfinke commented Mar 24, 2016

Wow, great idea, great question, I have no idea. I will investigate. Nudge me if I don't respond in the next few days.

Thanks
Doug

@Zuldan

This comment has been minimized.

Copy link
Author

@Zuldan Zuldan commented Mar 29, 2016

Thank you Doug! I don't know where you get the time for all of this.

So just some background info...which you probably already know.

The old reporting method, a Compliance server was used in PS4 but is now being removed (scheduled for xPSDesiredStateConfiguration v3.8.0.0 dsccommunity/xPSDesiredStateConfiguration#86). So there wouldn't be any point writing up on that.

The new method is accessing OData from a Report Server. However, in PS5, there is now 2 ways to register a node with a Pull server.

  1. Configuration ID method (it appears reporting is not currently working for this method. See dsccommunity/xPSDesiredStateConfiguration#97). To get a report for a single ndoe, you would do something like...

$requestUri = "$serviceURL/Nodes(ConfigurationId= '$ConfigurationId')/Reports"

  1. Registration Key method (which uses the AgentIDs). To get a report for a single node, you would do something like...

$requestUri = "$serviceURL/Nodes(AgentId= '$AgentId')/Reports"

I'm not sure how you would retrieve a report for 'all' nodes like you could with a Compliance server. That's what I was hoping to use ODataExplorer for.

@dfinke

This comment has been minimized.

Copy link
Owner

@dfinke dfinke commented Mar 29, 2016

I wrote the OData Explorer a few years ago and haven't touched it since. Great question. This is getting into DSC details. Maybe I can loop in some folks that have more insight.

@Zuldan Zuldan mentioned this issue Mar 29, 2016
@ArieHein

This comment has been minimized.

Copy link

@ArieHein ArieHein commented Apr 4, 2016

At the moment, no tool can allow you to query the OData. I tried a few including Dougs tool and also extracting the Odata files via powershell. Problem is MS didnt implement any Get method so no tool returns info, accept using the $requestUri and even then its limited to that structue which is a bit meh as it requires me to run the report from each node or manage AgentIDs in which case its bit silly considering the fact we removed the dependency on ConfigurationID GUIDS only to replace it with AgentID...

@dfinke

This comment has been minimized.

Copy link
Owner

@dfinke dfinke commented Apr 5, 2016

Thanks for the details. I've put this on my list to pass around to some of the PS DSC folks and get their insight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.