puppetdb query

[mshaik@puppetdb ~]$ curl -X GET http://localhost:8080/v3/facts/swapsize –data-urlencode ‘query=[“=”, “value”, “0.00 MB”]’
[ {
“value” : “0.00 MB”,
“name” : “swapsize”,
“certname” : “elk.c.rich-operand-154505.internal”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts/role/puppetdb
[ {
“value” : “puppetdb”,
“name” : “role”,
“certname” : “puppetdb.puppethub.in”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts/role –data-urlencode ‘query=[“=”, “value”, “puppetdb”]’
[ {
“value” : “puppetdb”,
“name” : “role”,
“certname” : “puppetdb.puppethub.in”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts/role/puppetmaster
[ {
“value” : “puppetmaster”,
“name” : “role”,
“certname” : “server.puppethub.in”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts/role/git
[ {
“value” : “git”,
“name” : “role”,
“certname” : “git.puppethub.in”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts/role/omdserver
[ {
“value” : “omdserver”,
“name” : “role”,
“certname” : “omd.puppethub.in”
} ]
[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts –data-urlencode ‘query=[“=”, “name”, “role”]’
[ {
“value” : “puppetmaster”,
“name” : “role”,
“certname” : “server.puppethub.in”
}, {
“value” : “puppetdb”,
“name” : “role”,
“certname” : “puppetdb.puppethub.in”
}, {
“value” : “omdserver”,
“name” : “role”,
“certname” : “omd.puppethub.in”
}, {
“value” : “git”,
“name” : “role”,
“certname” : “git.puppethub.in”
}, {
“value” : “elkstack”,
“name” : “role”,
“certname” : “elk.c.rich-operand-154505.internal”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts/operatingsystem
[ {
“value” : “CentOS”,
“name” : “operatingsystem”,
“certname” : “server.puppethub.in”
}, {
“value” : “CentOS”,
“name” : “operatingsystem”,
“certname” : “puppetdb.puppethub.in”
}, {
“value” : “CentOS”,
“name” : “operatingsystem”,
“certname” : “omd.puppethub.in”
}, {
“value” : “CentOS”,
“name” : “operatingsystem”,
“certname” : “git.puppethub.in”
}, {
“value” : “CentOS”,
“name” : “operatingsystem”,
“certname” : “elk.c.rich-operand-154505.internal”
} ]

[root@puppetdb ~]# curl -X GET http://localhost:8080/v3/facts –data-urlencode ‘query=[“=”, “certname”, “server.puppethub.in”]’
[ {
“value” : “server”,
“name” : “hostname”,
“certname” : “server.puppethub.in”
}, {
“value” : “4.8”,
“name” : “kernelmajversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “3.8.7”,
“name” : “puppetversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “3.8.7”,
“name” : “clientversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “45.56.102.0”,
“name” : “network_eth0”,
“certname” : “server.puppethub.in”
}, {
“value” : “512.00 MB”,
“name” : “swapsize”,
“certname” : “server.puppethub.in”
}, {
“value” : “2.0.0”,
“name” : “rubyversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “Linux”,
“name” : “kernel”,
“certname” : “server.puppethub.in”
}, {
“value” : “SSHFP 4 1 6deb04af3252a4d47934cac946c36aac24998e75\nSSHFP 4 2 9e66b15e708d7a3f02812cc792760d9773d842e91b136658a072781cdc6cdc47”,
“name” : “sshfp_ed25519”,
“certname” : “server.puppethub.in”
}, {
“value” : “SSHFP 3 1 d5c729fd30ec8f2090d06a146c4aeee4f5a9b53e\nSSHFP 3 2 70ebe60e94f99f17293a61af036b57322ce462aa4abe0967eadd36fa523b89f1”,
“name” : “sshfp_ecdsa”,
“certname” : “server.puppethub.in”
}, {
“value” : “255.0.0.0”,
“name” : “netmask_lo”,
“certname” : “server.puppethub.in”
}, {
“value” : “Not Settable”,
“name” : “uuid”,
“certname” : “server.puppethub.in”
}, {
“value” : “536870912”,
“name” : “blockdevice_sdb_size”,
“certname” : “server.puppethub.in”
}, {
“value” : “2600:3c03::f03c:91ff:febb:f57c”,
“name” : “ipaddress6”,
“certname” : “server.puppethub.in”
}, {
“value” : “2600:3c03::f03c:91ff:febb:f57c”,
“name” : “ipaddress6_eth0”,
“certname” : “server.puppethub.in”
}, {
“value” : “systemd”,
“name” : “service_provider”,
“certname” : “server.puppethub.in”
}, {
“value” : “true”,
“name” : “is_virtual”,
“certname” : “server.puppethub.in”
}, {
“value” : “puppethub.in”,
“name” : “domain”,
“certname” : “server.puppethub.in”
}, {
“value” : “Standard PC (i440FX + PIIX, 1996)”,
“name” : “productname”,
“certname” : “server.puppethub.in”
}, {
“value” : “7.2.1511”,
“name” : “operatingsystemrelease”,
“certname” : “server.puppethub.in”
}, {
“value” : “25232932864”,
“name” : “blockdevice_sda_size”,
“certname” : “server.puppethub.in”
}, {
“value” : “1.95 GB”,
“name” : “memorysize”,
“certname” : “server.puppethub.in”
}, {
“value” : “8a:ae:6e:36:75:d0”,
“name” : “macaddress”,
“certname” : “server.puppethub.in”
}, {
“value” : “8a:ae:6e:36:75:d0”,
“name” : “macaddress_dummy0”,
“certname” : “server.puppethub.in”
}, {
“value” : “QEMU”,
“name” : “blockdevice_sda_vendor”,
“certname” : “server.puppethub.in”
}, {
“value” : “QEMU”,
“name” : “manufacturer”,
“certname” : “server.puppethub.in”
}, {
“value” : “QEMU”,
“name” : “blockdevice_sdb_vendor”,
“certname” : “server.puppethub.in”
}, {
“value” : “1997.29”,
“name” : “memorysize_mb”,
“certname” : “server.puppethub.in”
}, {
“value” : “SeaBIOS”,
“name” : “bios_vendor”,
“certname” : “server.puppethub.in”
}, {
“value” : “AAAAB3NzaC1yc2EAAAADAQABAAABAQDRmbLwKkCn//akK1MzGI2OUd+SU+XZJNdmtRTmmEhtDsShXzR4zO+59v3QU23f9qOybtt82C5QmpuIYKlBEMOTlisDPFXP9oZ+1UOGqFUIviX6MxxkZEu4cDWWf6JRtZX52Iw6LuTCiqj6EJ+HPBDLUjVH1ue+8zmMqYpdqKitJdiZVHKIA5t4dQutXRKyRLK1eTiMkDffxkIzKZic2UBL1crfnAUoaWLzo+LvlebaG2XZcfC+J/9LGNfNoocBwmBx7ivdlDV5hxRK6+227pz4+r2y2J9NZNaIDVuEByVO1qgmKqguoeB2/8XCtnPNByjtXDfAeLYgPj/CBy/iXWhp”,
“name” : “sshrsakey”,
“certname” : “server.puppethub.in”
}, {
“value” : “Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz”,
“name” : “processor0”,
“certname” : “server.puppethub.in”
}, {
“value” : “4.8.6-x86_64-linode78”,
“name” : “kernelrelease”,
“certname” : “server.puppethub.in”
}, {
“value” : “yum”,
“name” : “package_provider”,
“certname” : “server.puppethub.in”
}, {
“value” : “127.0.0.1”,
“name” : “ipaddress_lo”,
“certname” : “server.puppethub.in”
}, {
“value” : “45.56.102.154”,
“name” : “ipaddress”,
“certname” : “server.puppethub.in”
}, {
“value” : “45.56.102.154”,
“name” : “ipaddress_eth0”,
“certname” : “server.puppethub.in”
}, {
“value” : “Other”,
“name” : “type”,
“certname” : “server.puppethub.in”
}, {
“value” : “QEMU HARDDISK”,
“name” : “blockdevice_sda_model”,
“certname” : “server.puppethub.in”
}, {
“value” : “QEMU HARDDISK”,
“name” : “blockdevice_sdb_model”,
“certname” : “server.puppethub.in”
}, {
“value” : “Not Specified”,
“name” : “serialnumber”,
“certname” : “server.puppethub.in”
}, {
“value” : “7”,
“name” : “operatingsystemmajrelease”,
“certname” : “server.puppethub.in”
}, {
“value” : “x86_64”,
“name” : “hardwareisa”,
“certname” : “server.puppethub.in”
}, {
“value” : “x86_64”,
“name” : “hardwaremodel”,
“certname” : “server.puppethub.in”
}, {
“value” : “x86_64”,
“name” : “architecture”,
“certname” : “server.puppethub.in”
}, {
“value” : “1480”,
“name” : “mtu_tunl0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1480”,
“name” : “mtu_sit0”,
“certname” : “server.puppethub.in”
}, {
“value” : “f2:3c:91:bb:f5:7c”,
“name” : “macaddress_eth0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1452”,
“name” : “mtu_ip6tnl0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1476”,
“name” : “mtu_gre0”,
“certname” : “server.puppethub.in”
}, {
“value” : “AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJrsh0ToriyBMTo54q/XVim1mG3HxMZzxkEKetPuxq//auV1Ky8N+BkD/FZbguuuZKapKcw/OgMcDPLqD6Ij7+w=”,
“name” : “sshecdsakey”,
“certname” : “server.puppethub.in”
}, {
“value” : “kvm”,
“name” : “virtual”,
“certname” : “server.puppethub.in”
}, {
“value” : “2.4.6”,
“name” : “facterversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “{\”name\”=>\”CentOS\”, \”family\”=>\”RedHat\”, \”release\”=>{\”major\”=>\”7\”, \”minor\”=>\”2\”, \”full\”=>\”7.2.1511\”}}”,
“name” : “os”,
“certname” : “server.puppethub.in”
}, {
“value” : “sda,sdb”,
“name” : “blockdevices”,
“certname” : “server.puppethub.in”
}, {
“value” : “/root”,
“name” : “root_home”,
“certname” : “server.puppethub.in”
}, {
“value” : “1448”,
“name” : “mtu_ip6gre0”,
“certname” : “server.puppethub.in”
}, {
“value” : “/var/lib/puppet/concat”,
“name” : “concat_basedir”,
“certname” : “server.puppethub.in”
}, {
“value” : “00:00:00:00:00:00”,
“name” : “macaddress_gretap0”,
“certname” : “server.puppethub.in”
}, {
“value” : “dummy0,eth0,gre0,gretap0,ip6_vti0,ip6gre0,ip6tnl0,ip_vti0,lo,sit0,teql0,tunl0”,
“name” : “interfaces”,
“certname” : “server.puppethub.in”
}, {
“value” : “1462”,
“name” : “mtu_gretap0”,
“certname” : “server.puppethub.in”
}, {
“value” : “x86_64-linux”,
“name” : “rubyplatform”,
“certname” : “server.puppethub.in”
}, {
“value” : “4.8.6”,
“name” : “kernelversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “root”,
“name” : “gid”,
“certname” : “server.puppethub.in”
}, {
“value” : “root”,
“name” : “id”,
“certname” : “server.puppethub.in”
}, {
“value” : “ps -ef”,
“name” : “ps”,
“certname” : “server.puppethub.in”
}, {
“value” : “server.puppethub.in”,
“name” : “clientcert”,
“certname” : “server.puppethub.in”
}, {
“value” : “server.puppethub.in”,
“name” : “fqdn”,
“certname” : “server.puppethub.in”
}, {
“value” : “1428”,
“name” : “mtu_ip_vti0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1500”,
“name” : “mtu_teql0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1500”,
“name” : “mtu_ip6_vti0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1500”,
“name” : “mtu_eth0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1500”,
“name” : “mtu_dummy0”,
“certname” : “server.puppethub.in”
}, {
“value” : “/var/lib/puppet”,
“name” : “puppet_vardir”,
“certname” : “server.puppethub.in”
}, {
“value” : “SSHFP 1 1 dbef8d5edbe532006416c2e064be628c7372480e\nSSHFP 1 2 aab085af204f3919bfa11648f637d25f4d4f0a6ba1fd11603718f8e85009199b”,
“name” : “sshfp_rsa”,
“certname” : “server.puppethub.in”
}, {
“value” : “04/01/2014”,
“name” : “bios_release_date”,
“certname” : “server.puppethub.in”
}, {
“value” : “false”,
“name” : “clientnoop”,
“certname” : “server.puppethub.in”
}, {
“value” : “false”,
“name” : “selinux”,
“certname” : “server.puppethub.in”
}, {
“value” : “false”,
“name” : “is_pe”,
“certname” : “server.puppethub.in”
}, {
“value” : “255.255.255.0”,
“name” : “netmask”,
“certname” : “server.puppethub.in”
}, {
“value” : “255.255.255.0”,
“name” : “netmask_eth0”,
“certname” : “server.puppethub.in”
}, {
“value” : “1”,
“name” : “processorcount”,
“certname” : “server.puppethub.in”
}, {
“value” : “1”,
“name” : “physicalprocessorcount”,
“certname” : “server.puppethub.in”
}, {
“value” : “rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org”,
“name” : “bios_version”,
“certname” : “server.puppethub.in”
}, {
“value” : “btrfs,cramfs,ext2,ext3,ext4,gfs2,gfs2meta,iso9660,jfs,reiserfs,romfs,squashfs,udf,vfat,xfs”,
“name” : “filesystems”,
“certname” : “server.puppethub.in”
}, {
“value” : “/usr/local/share/ruby/site_ruby/”,
“name” : “rubysitedir”,
“certname” : “server.puppethub.in”
}, {
“value” : “1.4.21”,
“name” : “iptables_version”,
“certname” : “server.puppethub.in”
}, {
“value” : “1.4.21”,
“name” : “ip6tables_version”,
“certname” : “server.puppethub.in”
}, {
“value” : “512.00”,
“name” : “swapsize_mb”,
“certname” : “server.puppethub.in”
}, {
“value” : “CentOS”,
“name” : “operatingsystem”,
“certname” : “server.puppethub.in”
}, {
“value” : “puppetmaster”,
“name” : “role”,
“certname” : “server.puppethub.in”
}, {
“value” : “{\”models\”=>[\”Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz\”], \”count\”=>1, \”physicalcount\”=>1}”,
“name” : “processors”,
“certname” : “server.puppethub.in”
}, {
“value” : “1.4.0”,
“name” : “augeasversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “127.0.0.0”,
“name” : “network_lo”,
“certname” : “server.puppethub.in”
}, {
“value” : “AAAAC3NzaC1lZDI1NTE5AAAAIN5GIh1xNGg3WfaFgoap+6h2d+KepCSOtXr1b0dVuIQB”,
“name” : “sshed25519key”,
“certname” : “server.puppethub.in”
}, {
“value” : “RedHat”,
“name” : “osfamily”,
“certname” : “server.puppethub.in”
}, {
“value” : “65536”,
“name” : “mtu_lo”,
“certname” : “server.puppethub.in”
}, {
“value” : “1.8.6p7”,
“name” : “sudoversion”,
“certname” : “server.puppethub.in”
}, {
“value” : “6.6.1p1,”,
“name” : “ssh_server_version_full”,
“certname” : “server.puppethub.in”
}, {
“value” : “6.6.1p1,”,
“name” : “ssh_client_version_full”,
“certname” : “server.puppethub.in”
}, {
“value” : “6.6”,
“name” : “ssh_client_version_major”,
“certname” : “server.puppethub.in”
}, {
“value” : “6.6”,
“name” : “ssh_server_version_major”,
“certname” : “server.puppethub.in”
}, {
“value” : “6.6.1”,
“name” : “ssh_server_version_release”,
“certname” : “server.puppethub.in”
}, {
“value” : “6.6.1”,
“name” : “ssh_client_version_release”,
“certname” : “server.puppethub.in”
}, {
“value” : “EST”,
“name” : “timezone”,
“certname” : “server.puppethub.in”
}, {
“value” : “499.91”,
“name” : “swapfree_mb”,
“certname” : “server.puppethub.in”
}, {
“value” : “499.91 MB”,
“name” : “swapfree”,
“certname” : “server.puppethub.in”
}, {
“value” : “382d9a66”,
“name” : “uniqueid”,
“certname” : “server.puppethub.in”
}, {
“value” : “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin”,
“name” : “path”,
“certname” : “server.puppethub.in”
}, {
“value” : “68”,
“name” : “uptime_days”,
“certname” : “server.puppethub.in”
}, {
“value” : “68 days”,
“name” : “uptime”,
“certname” : “server.puppethub.in”
}, {
“value” : “1651”,
“name” : “uptime_hours”,
“certname” : “server.puppethub.in”
}, {
“value” : “{\”seconds\”=>5947036, \”hours\”=>1651, \”days\”=>68, \”uptime\”=>\”68 days\”}”,
“name” : “system_uptime”,
“certname” : “server.puppethub.in”
}, {
“value” : “917.15”,
“name” : “memoryfree_mb”,
“certname” : “server.puppethub.in”
}, {
“value” : “5947036”,
“name” : “uptime_seconds”,
“certname” : “server.puppethub.in”
}, {
“value” : “917.15 MB”,
“name” : “memoryfree”,
“certname” : “server.puppethub.in”
} ]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s