Jira (PDB-2172) Make "unreported" hosts easier to query for

2023-06-21 Thread 'Claudia Petty (Jira)' via Puppet Bugs
Title: Message Title


 
 
 
 

 
 
 

 
   
 Claudia Petty updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PuppetDB /  PDB-2172  
 
 
  Make "unreported" hosts easier to query for   
 

  
 
 
 
 

 
Change By: 
 Claudia Petty  
 
 
Labels: 
 new-feature  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.105335.1447267236000.2486.1687359482081%40Atlassian.JIRA.


Jira (PDB-2172) Make "unreported" hosts easier to query for

2015-11-24 Thread Kurt Wall (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kurt Wall updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 PuppetDB /  PDB-2172 
 
 
 
  Make "unreported" hosts easier to query for  
 
 
 
 
 
 
 
 
 

Change By:
 
 Kurt Wall 
 
 
 

QA Status:
 
 Reviewed 
 
 
 

QA Risk Assessment:
 
 Low 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-2172) Make "unreported" hosts easier to query for

2015-11-11 Thread Nick Peelman (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nick Peelman created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 PuppetDB /  PDB-2172 
 
 
 
  Make "unreported" hosts easier to query for  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  New Feature 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2015/11/11 10:40 AM 
 
 
 

Fix Versions:
 

 PDB 4.0.0 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Nick Peelman 
 
 
 
 
 
 
 
 
 
 
Right now, it is (relatively) easy to get changed, unchanged, or failed counts out of PuppetDB, as well as the aggregate number of hosts. What isn't so easy is to retrieve a count of unreported hosts within a set time difference. 
Ideally, something akin to  
 
 
 
 
 
 
/metrics/v1/mbeans/puppetlabs.puppetdb.query.population:type=default,name=num-nodes-unreported
 
 
 
 
 
 
 
would be great; but there is probably a better option. That would assume an 'unreported after x hours/minutes' setting configured somewhere. pypuppetdb can fetch this count, but it would be great if it were available directly via PuppetDB endpoint. 

Jira (PDB-2172) Make "unreported" hosts easier to query for

2015-11-11 Thread Nick Peelman (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nick Peelman updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 PuppetDB /  PDB-2172 
 
 
 
  Make "unreported" hosts easier to query for  
 
 
 
 
 
 
 
 
 

Change By:
 
 Nick Peelman 
 
 
 
 
 
 
 
 
 
 Right now, it is (relatively) easy to get changed, unchanged, or failed counts out of PuppetDB, as well as the aggregate number of hosts.  What isn't so easy is to retrieve a count of unreported hosts within a set time difference.Ideally, something akin to {code:java}/metrics/v1/mbeans/puppetlabs.puppetdb.query.population:type=default,name=num-nodes-unreported{code}would be great; but there is probably a better option.  That would assume an 'unreported after x hours/minutes' setting configured somewhere.  pypuppetdb can fetch this count, but it would be great if it were available directly via PuppetDB endpoint.[This appears to have been a thing in the past ](  | https://ask.puppetlabs.com/question/15623/api-query-for-finding-unreported-nodes/ ) ] , but no longer exists (or is undocumented as far as I can tell) in the current versions. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-2172) Make "unreported" hosts easier to query for

2015-11-11 Thread Wyatt Alt (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Wyatt Alt commented on  PDB-2172 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Make "unreported" hosts easier to query for  
 
 
 
 
 
 
 
 
 
 
Nick Peelman does this do what you need? 
 
 
 
 
 
 
curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["<","report_timestamp",]'
 
 
 
 
 
 
 
you could get the count with the include_total parameter, or with 
 
 
 
 
 
 
curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["extract",["function","count"],["<","report_timestamp",]]'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to 

Jira (PDB-2172) Make "unreported" hosts easier to query for

2015-11-11 Thread Nick Peelman (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nick Peelman commented on  PDB-2172 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Make "unreported" hosts easier to query for  
 
 
 
 
 
 
 
 
 
 
Wyatt, 
After a fashion, yeah, that did the trick. 
Ended up using this in our Dashing widget: 
 
 
 
 
 
 
  
 
 
 
 
_one_hour_ago_ = (Time.now - 60*60).utc.iso8601 
 
 
 
 
reported_in_uri = "/pdb/query/v4/nodes?query=%5B%22extract%22%2C%5B%5B%22function%22%2C%22count%22%5D%5D%2C%5B%22%3C%22%2C%22report_timestamp%22%2C%22#{one_hour_ago}%22%5D%5D"
 
 
 
 
 
 
 
Decoded: 
 
 
 
 
 
 
["extract",[["function","count"]],["<","report_timestamp","#{one_hour_ago}"]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment