> Would like to use PuppetDB to find out more about the estate inventory. > Specifically at the moment I am trying to find out the amount of servers > using "productname", and the "physicalprocessorcount" for each - both with > totals. > > Is this doable from the API at all, or easier from inside PSQL ?
Do-able, but there are no server side aggregate operators/handlers for this case in particular, its on our radar however. You can fake it by using the include-total pagination option, and making your query specific: https://gist.github.com/kbarber/8175145dcca982b5cd0c Then pluck out the 'X-Records' field, but that would require two queries, one for each fact, /v4/facts/fact1 & /v4/facts/fact2. Otherwise perform a proper query for both fields, and count the results yourself programmatically. I can't recommend going to PostgreSQL directly, that isn't an API contract we have commitments to - ie. we will change it underneath you without warning or remorse today, even in a Z release :-). ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAE4bNTmdh44T-d-A1O8e6-ycLc0Of5gOja4-yi3Z-UwJxH9Zgw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
