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

'summarize-by' parameter not supported #9

Closed
ccaum opened this issue Jul 9, 2014 · 2 comments
Closed

'summarize-by' parameter not supported #9

ccaum opened this issue Jul 9, 2014 · 2 comments

Comments

@ccaum
Copy link
Contributor

ccaum commented Jul 9, 2014

The event-counts endpoint requires the 'summarize-by' parameter. However, when I specify that parameter, PuppetDB fails saying the parameter wasn't passed to it.
For example:

client.request( 'event-counts', [:and, [:'<', 'timestamp', Time.now ], [:'>', 'timestamp', 2.days.ago], {:'summarize-by' => 'resource'}] )

@patrobinson
Copy link

Your code should look like this:

client.request( 'event-counts',
  [:and,
    [:'<', 'timestamp', Time.now ],
    [:'>', 'timestamp', 2.days.ago],
  ],
  {:'summarize-by' => 'resource'}
)

Notice the summarize-by is outside the query array, it's a separate parameter.

@ccaum
Copy link
Contributor Author

ccaum commented Apr 28, 2015

Ah, thanks @Nemski

@ccaum ccaum closed this as completed Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants