SlideShare a Scribd company logo
PuppetDB, Puppet
Explorer and
puppetdbquery
Erik Dalén
PuppetDB
Aclojure service with a PostgreSQL
backend.
Stores data produced by Puppet:
‣ facts
‣ catalogs
‣ reports
Resource collections
Allows you to export and collect
resources.
class ssh {
# Declare:
@@sshkey { $hostname:
type => dsa,
key => $sshdsakey,
}
# Collect:
Sshkey <<| |>>
}
Query API
PuppetDB has a rich queryAPI.
Can query nodes, environments,
facts, fact paths, catalogs,
resources, edges, reports and
events.
Allows subqueries between
endpoints.
Query API example
["and",
["in","certname",
["extract","certname",
["select_fact_contents",
["and",
["=","path",["lsbdistcodename"]],
["=","value","squeeze"]]]]],
["in","certname",
["extract","certname",
["select_resources",
["and",
["=","type","Class"],
["=","title","Nginx"],
["=","exported",false]]]]]]
lsbdistcodename=squeeze and class[nginx]
same query in puppetdbquery
puppetdbquery
Amodule for Puppet for querying
PuppetDB with:
‣ functions
‣ clitool/puppetface
‣ hierabackend
‣ RubyAPI
github.com/dalen/puppet-
puppetdbquery
forge.puppetlabs.com/dalen/
puppetdbquery
Query syntax
Comparison operators
=
!=
>
>=
<
<=
~
!~
Logical Operators
and
or
not
Fact comparisons
factname = value
uptime.days > 209
apt_package_updates.* ~ openssl
Resource expressions
type[name] { parameter = value }
Syntactic sugar and advanced stuff
Date expressions
@yesterday
@"feb 1 2015"
Subqueries
#node.latest_report_status=failed
#node { report_timestamp > @"4
hours ago" and report_timestamp <
@"2 hours ago" }
Poor mans mcollective
pssh -h <(puppet query nodes 'site=lon and class[nginx]') 
sudo service nginx restart
Puppet
Explorer
Puppet Explorer
Web UI forvisualizing data in
PuppetDB.
Made using CoffeeScript and
AngularJS
Borrows ideas from puppetdbquery
and contains a JavaScript
implementation of it called node-
puppetdbquery
Demo time

More Related Content

PDF
Manifests of Future Past
PPTX
Migrating to Puppet 4.0
PDF
KubeCon EU 2016: Custom Volume Plugins
PPTX
How Secure Are Docker Containers?
PDF
Configuration surgery with Augeas (OggCamp 12)
PDF
Hd insight programming
KEY
dotCloud and go
PDF
并发模型介绍
Manifests of Future Past
Migrating to Puppet 4.0
KubeCon EU 2016: Custom Volume Plugins
How Secure Are Docker Containers?
Configuration surgery with Augeas (OggCamp 12)
Hd insight programming
dotCloud and go
并发模型介绍

What's hot (20)

PPT
Working with databases in Perl
PDF
Programming with Python and PostgreSQL
PDF
Ethiopian multiplication in Perl6
PDF
Augeas @RMLL 2012
PPTX
Psycopg2 - Connect to PostgreSQL using Python Script
PDF
Nubilus Perl
PPTX
Ch3(working with file)
KEY
Perl Web Client
PDF
Legacy applications - 4Developes konferencja, Piotr Pasich
PDF
Docker tips & tricks
PDF
The Unbearable Lightness: Extending the Bash shell
PPTX
Parse, scale to millions
PDF
Redis for the Everyday Developer
PDF
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
PPTX
Using Cerberus and PySpark to validate semi-structured datasets
KEY
занятие8
PPTX
Hive data migration (export/import)
PDF
Plone Conference 2008 Lightning Talk Static Zope Rpx
TXT
C99.php
PPTX
Database Homework Help
Working with databases in Perl
Programming with Python and PostgreSQL
Ethiopian multiplication in Perl6
Augeas @RMLL 2012
Psycopg2 - Connect to PostgreSQL using Python Script
Nubilus Perl
Ch3(working with file)
Perl Web Client
Legacy applications - 4Developes konferencja, Piotr Pasich
Docker tips & tricks
The Unbearable Lightness: Extending the Bash shell
Parse, scale to millions
Redis for the Everyday Developer
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Using Cerberus and PySpark to validate semi-structured datasets
занятие8
Hive data migration (export/import)
Plone Conference 2008 Lightning Talk Static Zope Rpx
C99.php
Database Homework Help
Ad

Viewers also liked (20)

PDF
Managing Puppet using MCollective
PDF
Red Hat Satellite 6 - Automation with Puppet
PDF
Docker and Puppet for Continuous Integration
PPTX
Windows Configuration Management: Managing Packages, Services, & Power Shell-...
PPTX
Installaling Puppet Master and Agent
PPTX
Provisioning environments. A simplistic approach
PPTX
Package Management on Windows with Chocolatey
KEY
Puppet for dummies - ZendCon 2011 Edition
PDF
Icinga 2 and Puppet automate monitoring
PPTX
Intro to Puppet Enterprise
PDF
Using Docker with Puppet - PuppetConf 2014
PDF
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
PDF
Managing Windows Systems with Puppet - PuppetConf 2013
PDF
Designing Puppet: Roles/Profiles Pattern
PDF
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
PPTX
Deploying E.L.K stack w Puppet
PDF
Using MCollective with Chef - cfgmgmtcamp.eu 2014
PDF
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
PDF
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PDF
Introduction to orchestration using Mcollective
Managing Puppet using MCollective
Red Hat Satellite 6 - Automation with Puppet
Docker and Puppet for Continuous Integration
Windows Configuration Management: Managing Packages, Services, & Power Shell-...
Installaling Puppet Master and Agent
Provisioning environments. A simplistic approach
Package Management on Windows with Chocolatey
Puppet for dummies - ZendCon 2011 Edition
Icinga 2 and Puppet automate monitoring
Intro to Puppet Enterprise
Using Docker with Puppet - PuppetConf 2014
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Managing Windows Systems with Puppet - PuppetConf 2013
Designing Puppet: Roles/Profiles Pattern
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Deploying E.L.K stack w Puppet
Using MCollective with Chef - cfgmgmtcamp.eu 2014
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
Introduction to orchestration using Mcollective
Ad

Similar to PuppetDB, Puppet Explorer and puppetdbquery (20)

PDF
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
PPTX
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
PPTX
Puppetcamp Melbourne - puppetdb
PPTX
Node collaboration - Exported Resources and PuppetDB
PDF
Puppet Camp Dallas 2014: Puppet Keynote
PDF
PuppetDB: One Year Faster - PuppetConf 2014
PPTX
Puppet at Spotify
PDF
Puppet Camp London 2014: Keynote
PDF
Puppet Camp New York Keynote
PDF
PuppetDB: Sneaking Clojure into Operations
PDF
Puppet Camp Tokyo 2014: Keynote
PDF
Puppet Camp DC 2014: Keynote
PDF
PuppetCamp SEA 1 - Use of Puppet
PDF
PuppetCamp SEA 1 - Use of Puppet
PPTX
Node collaboration - sharing information between your systems
PPT
State of Puppet 2013 - Puppet Camp DC
PDF
Puppet, now with google!
PDF
Puppet Camp Chicago 2014: Keynote
PDF
Taking devops to the Next Level - Max Martin
PDF
Puppet Camp Boston 2014: Keynote
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppetcamp Melbourne - puppetdb
Node collaboration - Exported Resources and PuppetDB
Puppet Camp Dallas 2014: Puppet Keynote
PuppetDB: One Year Faster - PuppetConf 2014
Puppet at Spotify
Puppet Camp London 2014: Keynote
Puppet Camp New York Keynote
PuppetDB: Sneaking Clojure into Operations
Puppet Camp Tokyo 2014: Keynote
Puppet Camp DC 2014: Keynote
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
Node collaboration - sharing information between your systems
State of Puppet 2013 - Puppet Camp DC
Puppet, now with google!
Puppet Camp Chicago 2014: Keynote
Taking devops to the Next Level - Max Martin
Puppet Camp Boston 2014: Keynote

More from Puppet (20)

PPTX
Puppet Community Day: Planning the Future Together
PPTX
The Evolution of Puppet: Key Changes and Modernization Tips
PPTX
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...
PPTX
Bolt Dynamic Inventory: Making Puppet Easier
PPTX
Customizing Reporting with the Puppet Report Processor
PPTX
Puppet at ConfigMgmtCamp 2025 Sponsor Deck
PPTX
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...
PPTX
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...
PDF
Puppet camp2021 testing modules and controlrepo
PPTX
Puppetcamp r10kyaml
PDF
2021 04-15 operational verification (with notes)
PPTX
Puppet camp vscode
PDF
Modules of the twenties
PDF
Applying Roles and Profiles method to compliance code
PPTX
KGI compliance as-code approach
PDF
Enforce compliance policy with model-driven automation
PDF
Keynote: Puppet camp compliance
PPTX
Automating it management with Puppet + ServiceNow
PPTX
Puppet: The best way to harden Windows
PPTX
Simplified Patch Management with Puppet - Oct. 2020
Puppet Community Day: Planning the Future Together
The Evolution of Puppet: Key Changes and Modernization Tips
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...
Bolt Dynamic Inventory: Making Puppet Easier
Customizing Reporting with the Puppet Report Processor
Puppet at ConfigMgmtCamp 2025 Sponsor Deck
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...
Puppet camp2021 testing modules and controlrepo
Puppetcamp r10kyaml
2021 04-15 operational verification (with notes)
Puppet camp vscode
Modules of the twenties
Applying Roles and Profiles method to compliance code
KGI compliance as-code approach
Enforce compliance policy with model-driven automation
Keynote: Puppet camp compliance
Automating it management with Puppet + ServiceNow
Puppet: The best way to harden Windows
Simplified Patch Management with Puppet - Oct. 2020

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
DOCX
The AUB Centre for AI in Media Proposal.docx
Machine learning based COVID-19 study performance prediction
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Diabetes mellitus diagnosis method based random forest with bat algorithm
CIFDAQ's Market Insight: SEC Turns Pro Crypto
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Empathic Computing: Creating Shared Understanding
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Monthly Chronicles - July 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
The AUB Centre for AI in Media Proposal.docx

PuppetDB, Puppet Explorer and puppetdbquery