Jira (PDB-5314) Extract old catalog from PDB

18 views
Skip to first unread message

Bogdan Irimie (Jira)

unread,
Oct 13, 2021, 4:04:03 AM10/13/21
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
 
PuppetDB / Task PDB-5314
Extract old catalog from PDB
Change By: Bogdan Irimie
Summary: Extract one old catalog from PDB
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Bogdan Irimie (Jira)

unread,
Oct 13, 2021, 4:05:01 AM10/13/21
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Extract catalogs
* for a single node
* for an environment (e.g. production)

Bogdan Irimie (Jira)

unread,
Oct 13, 2021, 4:05:02 AM10/13/21
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Story Points: 2

Andrei Filipovici (Jira)

unread,
Oct 18, 2021, 3:16:04 AM10/18/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Change By: Andrei Filipovici
Extract catalogs
* for a single node
* for an environment (e.g. production)

We also need the facts for one node and for an environment

Andrei Filipovici (Jira)

unread,
Oct 18, 2021, 3:17:03 AM10/18/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Change By: Andrei Filipovici
Sprint: ghost- 3 20 . 11 10 . 2023 2022

Sebastian Miclea (Jira)

unread,
Oct 18, 2021, 3:21:02 AM10/18/21
to puppe...@googlegroups.com
Sebastian Miclea assigned an issue to Sebastian Miclea
Change By: Sebastian Miclea
Assignee: Sebastian Miclea

Sebastian Miclea (Jira)

unread,
Oct 19, 2021, 8:39:02 AM10/19/21
to puppe...@googlegroups.com
Sebastian Miclea commented on Task PDB-5314
 
Re: Extract old catalog from PDB

Get facts for one node:

 

http://localhost:8080/pdb/query/v4/facts?query=["=", "certname", "host-1"]

 

Get facts for one node in environment

http://localhost:8080/pdb/query/v4/environments/production/facts?query=["=", "certname", "host-1"] 

 

Get latest catalog for one node in environment:

http://localhost:8080/pdb/query/v4/catalogs?query=["and", ["=","certname","host-1"],["=", "environment", "production"]]&order_by=[{"field": "producer_timestamp", "order": "desc"}]&limit=1

Bogdan Irimie (Jira)

unread,
Oct 20, 2021, 3:58:02 AM10/20/21
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-20.10.2022 , ghost-3.11.2023

Andrei Filipovici (Jira)

unread,
Oct 21, 2021, 7:18:03 AM10/21/21
to puppe...@googlegroups.com
Andrei Filipovici commented on Task PDB-5314
 
Re: Extract old catalog from PDB

To get the node certnames from an environment we can do a POST request on the nodes endpoint with the following query:

["extract", "certname", ["=", "catalog_environment", "<env_name>"]]

Reply all
Reply to author
Forward
0 new messages