puppetexplorer
puppetexplorer copied to clipboard
Requesting v4 when using 1.5.0
Greetings,
I have a separate puppetDB server and I have these packages installed:
rpm -qa | grep -i puppet
puppet-3.8.2-1.el6.noarch puppetexplorer-1.5.0-1.noarch puppetdb-2.3.6-1.el6.noarch
I used the spotify-puppetexplorer v1.0.1 puppet module from the forge to install and knowing that the latest 2.0 does not work with my version of puppetdb (2.3.6), I manually installed puppetexplorer.
Initially I started with this in my site.pp: class { 'puppetexplorer': manage_yum => false,}
However, all it did was show spinning icons (much like how http://demo.puppetexplorer.io currently does). I traced things down a bit and when I put this http://127.0.0.1:8080/v3/metrics/mbean/java.lang:type=Memory into firefox (running on the puppetdb server) I get the message "must accept application/json" but I can see data when I mess around with curl.
When I put http://my.fqdn/api/metrics/mbean/java.lang:type=Memory into firefox I get "Not Found".
So I read about the proxy pass and I adjusted it to this; class { 'puppetexplorer': manage_yum => false, proxy_pass => [ { 'path' => 'http://my.fqdn//api/pdb/query', 'url' => 'http://localhost:8080/v3/pdb/query' }, { 'path' => 'http://my.fqdn/api/pdb/meta', 'url' => 'http://localhost:8080/v3/pdb/meta' }, { 'path' => 'http://my.fqdn//api/metrics', 'url' => 'http://localhost:8080/v3/metrics' } ]}
Re-ran 'puppet agent -t' and now when I go to my puppet dashboard I see this:
Not Found
The requested URL /api/v4/nodes was not found on this server.
Say what? v4? Where is it getting that from? I ran a recursive grep on my entire disk and I can't find where it is pulling v4 from. I wiped everything I could from puppetexplorer hoping to dump out some bad cache file or something and I tried it again. Same error. :-/
Also, I still get spinning things still and despite the proxy pass being in apache I still get "Not Found" when I connect to http://my.fqdn/api/metrics/mbean/java.lang:type=Memory .
The only thing I see in the apache log is "File does not exist: /usr/share/puppetexplorer/api" (which is a valid statement; but I am not sure what to do with it).
It would be really nice if there were some better examples of how this is supposed to work as well some information on how to debug it when things like this are going wrong.
Any help would be greatly appreciated.
Same here, installed version 1.5.0-59 (Debian) and the URLs fetched are /api/v4/...
In the 1.x version of the puppet module I changed the default config to point to the new v4 API. So this should work if you either downgrade the puppet module to 0.5.0 or specify the proxy_pass
parameter to the old default ([{ 'path' => '/api/v4', 'url' => 'http://localhost:8080/v4' }]
).
You likely also have to change the default queries for the dashboard_panels to match the PuppetDB 2.x syntax. But easiest is likely to downgrade the puppet module to 0.5.0.
I'm using PuppetDB v2.3.7, modified the proxy pass like you have specified (thanks !) and adapted dashboard_panels
to match the syntax (basically replace any _
by -
).
My mistake was that I did not know that v4 api endpoints are available in PuppetDB v2.x, though it was only from v3.x.
That works like a charm ! Thanks.
Change proxy_path to ProxyPass /api/v4 http://localhost:8080/v4
not solved it for me.
dpkg -l "puppet*"
ii puppet 3.8.3-1puppetlabs1 all Centralized configuration management - agent startup and compatibility scripts
un puppet-agent <none> (no description available)
ii puppet-common 3.8.3-1puppetlabs1 all Centralized configuration management
un puppet-el <none> (no description available)
ii puppetdb 2.3.7-1puppetlabs1 all PuppetDB Centralized Storage.
ii puppetexplorer 1.5.0-59 all web frontend for PuppetDB
ii puppetlabs-release 1.0-11 all "Package to install Puppet Labs gpg key and apt repo"
in apache access log i've found request: /api/pdb/query/v4/nodes?include_total=true&limit=1&query /api/metrics/v1/mbeans/puppetlabs.puppetdb.query.population
metrics
can be mapped to /v4/metrics/mbeans' but there is not 'puppetlabs.puppetdb.query.population
?
next nodes syntax in 2.3.x doesn't support include_total
?
What do I wrong?
Greetings,
I am still having issues. I messed with it this weekend and didn't get very far. So I built a VM with a pretty base install, installed puppet/puppetdb, and did a snapshot. Then I installed puppetexplorer and specified the --version='0.5.0'.
I am not sure what I am doing wrong but I still can't get it to work.
Here is the latest version I have:
node 'puppetmasterdev.puppet.test' { class { 'puppetdb::globals': version=>'2.3.6-1.el6'} class { 'puppetdb::database::postgresql': listen_addresses=>"127.0.0.1"} class { 'puppetdb::server': database_host=>"127.0.0.1",listen_address=>"127.0.0.1"} class { 'puppetdb::master::config': terminus_package=>"puppetdb-terminus",puppetdb_server=>"puppetmasterdev.puppet.test"} class { 'puppetexplorer': proxy_pass =>[{ 'path' => '/api/v4', 'url' => 'http://localhost:8080/v4' }] } }
I am currious what bigbrozer did with the dashboard_panels because I didn't have much luck with that either.
Thanks!