Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't view puppetdb dashboard inside foreman, as template is missing #51

Closed
x4FF3 opened this issue Apr 13, 2018 · 15 comments · Fixed by #59
Closed

can't view puppetdb dashboard inside foreman, as template is missing #51

x4FF3 opened this issue Apr 13, 2018 · 15 comments · Fixed by #59
Assignees

Comments

@x4FF3
Copy link

x4FF3 commented Apr 13, 2018

hi,

i get following message inside 1.17-rc2 as i try to view the puppetdb-dashboard:

Missing template puppetdb_foreman/puppetdb/index, application/index with {:locale=>[:de, :en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :rabl]}. 
Searched in: * "/usr/share/foreman/app/views" * "/usr/share/foreman/vendor/ruby/2.3.0/gems/puppetdb_foreman-4.0.0/app/views" * "/usr/share/foreman/vendor/ruby/2.3.0/gems/apipie-rails-0.5.6/app/views" 

foreman is installed on a deb9 machine.

KR
David

@timogoebel timogoebel added the bug label Apr 13, 2018
@treydock
Copy link
Member

Just hit this issue with Foreman 1.17.0 and tfm-rubygem-puppetdb_foreman-4.0.0-1.fm1_17.el7.noarch

@timogoebel
Copy link
Member

@x4FF3, @treydock: I hacked together a possible fix for this in #52. Can you please test this and report back? Thanks.

The dashboard proxying is really a huge hack, therefore I did not spend much time to improve the code. But the functionality should be restored now. Let me know, what you think.

@HristoMohamed
Copy link

Hey,
I expirenced hte smae problem and have applied your fix and it works for me :)

@anthonysomerset
Copy link

I applied this fix @timogoebel and at least i get no errors now :)

The PuppetDB Nodes page works fine, however the PuppetDB Dashboard appears to not load anything - this is clean install of PuppetDB and the foreman plugin

screenshot 2018-04-30 12 02 52

Note based on Ubuntu not CentOS

@anthonysomerset
Copy link

I note specifically this is because the following static resources are not proxied correctly

http://localhost:8080/pdb/dashboard/d3.v2.js
http://localhost:8080/pdb/dashboard/charts.js

as a quick fix i downloaded these files manually into the public directory of my foreman install and things work again

@timogoebel
Copy link
Member

@anthonysomerset: Can you send me a screenshot of your Browser's console? Then I can take a look what's wrong. Alternatively, the correct path of the resources in puppetdb would help.

@bastelfreak
Copy link
Member

Hi,
I'm running into the same issue as @x4FF3:

Oops, we're sorry but something went wrong Missing template puppetdb_foreman/puppetdb/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :rabl]}. Searched in: * "/usr/share/foreman/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_noenv-0.0.7/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.11.2/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/puppetdb_foreman-4.0.0/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.6/app/views"

2018-06-01-181346_705x329_scrot

The installed packages:

# rpm -qa | grep foreman
tfm-rubygem-foreman_column_view-0.4.0-1.fm1_17.el7.noarch
foreman-proxy-1.17.1-1.el7.noarch
tfm-rubygem-foreman_memcache-0.1.0-1.fm1_17.el7.noarch
foreman-debug-1.17.1-1.el7.noarch
tfm-rubygem-puppetdb_foreman-4.0.0-1.fm1_17.el7.noarch
foreman-1.17.1-1.el7.noarch
tfm-rubygem-foreman_graphite-0.0.3-4.fm1_17.el7.noarch
foreman-release-scl-4-1.el7.noarch
tfm-rubygem-foreman-tasks-core-0.2.4-1.fm1_17.el7.noarch
tfm-rubygem-foreman_noenv-0.0.7-2.fm1_17.el7.noarch
tfm-rubygem-foreman_noenv-doc-0.0.7-2.fm1_17.el7.noarch
foreman-release-1.17.1-1.el7.noarch
tfm-rubygem-foreman_default_hostgroup-4.0.1-1.fm1_17.el7.noarch
tfm-rubygem-foreman_hooks-0.3.14-2.fm1_17.el7.noarch
tfm-rubygem-foreman-tasks-0.11.2-1.fm1_17.el7.noarch
foreman-postgresql-1.17.1-1.el7.noarch
tfm-rubygem-foreman_default_hostgroup-doc-4.0.1-1.fm1_17.el7.noarch
foreman-selinux-1.17.1-1.el7.noarch
# rpm -qa | grep tfm
tfm-rubygem-netrc-0.11.0-2.el7.noarch
tfm-rubygem-addressable-2.3.6-5.el7.noarch
tfm-rubygem-useragent-0.16.8-2.el7.noarch
tfm-ror51-rubygem-arel-8.0.0-2.el7.centos.noarch
tfm-ror51-rubygem-rails-html-sanitizer-1.0.3-3.el7.centos.noarch
tfm-ror51-rubygem-rack-test-0.7.0-2.el7.centos.noarch
tfm-ror51-rubygem-activesupport-5.1.4-3.el7.centos.noarch
tfm-rubygem-audited-4.4.1-2.el7.noarch
tfm-rubygem-rails-i18n-5.0.4-1.el7.noarch
tfm-rubygem-deface-1.2.0-8.el7.noarch
tfm-rubygem-foreman_column_view-0.4.0-1.fm1_17.el7.noarch
tfm-ror51-runtime-1.1-2.el7.centos.x86_64
tfm-ror51-rubygem-concurrent-ruby-1.0.5-2.el7.centos.noarch
tfm-rubygem-ruby_parser-3.10.1-1.el7.noarch
tfm-rubygem-passenger-native-libs-4.0.18-9.12.el7.x86_64
tfm-rubygem-unf-0.1.3-6.el7.noarch
tfm-rubygem-algebrick-0.7.3-5.el7.noarch
tfm-rubygem-sshkey-1.9.0-2.el7.noarch
tfm-rubygem-rainbow-2.2.1-2.el7.noarch
tfm-ror51-rubygem-websocket-extensions-0.1.2-2.el7.centos.noarch
tfm-ror51-rubygem-execjs-2.7.0-2.el7.centos.noarch
tfm-ror51-rubygem-mime-types-data-3.2016.0521-2.el7.centos.noarch
tfm-ror51-rubygem-tilt-2.0.8-2.el7.centos.noarch
tfm-ror51-rubygem-railties-5.1.4-3.el7.centos.noarch
tfm-rubygem-validates_lengths_from_database-0.5.0-4.el7.noarch
tfm-ror51-rubygem-coffee-rails-4.2.2-2.el7.centos.noarch
tfm-rubygem-sprockets-rails-3.2.0-2.el7.noarch
tfm-rubygem-foreman_memcache-0.1.0-1.fm1_17.el7.noarch
tfm-rubygem-eventmachine-1.0.6-2.el7.x86_64
tfm-rubygem-net-ssh-4.0.1-4.el7.noarch
tfm-rubygem-gettext_i18n_rails-1.2.1-4.el7.noarch
tfm-rubygem-concurrent-ruby-edge-0.2.4-1.el7.noarch
tfm-rubygem-little-plugger-1.1.3-22.el7.noarch
tfm-rubygem-dalli-2.7.6-1.el7.noarch
tfm-rubygem-sequel-4.20.0-7.el7.noarch
tfm-ror51-rubygem-thread_safe-0.3.6-2.el7.centos.noarch
tfm-ror51-rubygem-crass-1.0.2-2.el7.centos.noarch
tfm-ror51-rubygem-globalid-0.4.1-2.el7.centos.noarch
tfm-ror51-rubygem-activejob-5.1.4-3.el7.centos.noarch
tfm-rubygem-deep_cloneable-2.2.2-2.el7.noarch
tfm-ror51-rubygem-actioncable-5.1.4-3.el7.centos.noarch
tfm-rubygem-ldap_fluff-0.4.7-2.el7.noarch
tfm-rubygem-puppetdb_foreman-4.0.0-1.fm1_17.el7.noarch
tfm-rubygem-foreman_graphite-0.0.3-4.fm1_17.el7.noarch
tfm-ror51-rubygem-rails-dom-testing-2.0.3-2.el7.centos.noarch
tfm-rubygem-fast_gettext-1.4.1-2.el7.noarch
tfm-rubygem-http-cookie-1.0.2-2.el7.noarch
tfm-rubygem-concurrent-ruby-1.0.3-1.fm1_16.el7.noarch
tfm-rubygem-parse-cron-0.1.4-3.fm1_17.el7.noarch
tfm-rubygem-foreman-tasks-core-0.2.4-1.fm1_17.el7.noarch
tfm-rubygem-pg-0.21.0-2.el7.x86_64
tfm-rubygem-css_parser-1.4.7-2.el7.noarch
tfm-rubygem-apipie-params-0.0.5-2.el7.noarch
tfm-rubygem-secure_headers-3.4.1-2.el7.noarch
tfm-ror51-rubygem-thor-0.20.0-2.el7.centos.noarch
tfm-ror51-rubygem-builder-3.2.3-2.el7.centos.noarch
tfm-ror51-rubygem-mail-2.7.0-3.el7.centos.noarch
tfm-ror51-rubygem-coffee-script-source-1.12.2-2.el7.centos.noarch
tfm-rubygem-rest-client-2.0.1-2.el7.noarch
tfm-ror51-rubygem-method_source-0.9.0-2.el7.centos.noarch
tfm-ror51-rubygem-sinatra-2.0.0-2.el7.centos.noarch
tfm-ror51-rubygem-actionview-5.1.4-4.el7.centos.noarch
tfm-ror51-rubygem-activerecord-5.1.4-3.el7.centos.noarch
tfm-rubygem-scoped_search-4.1.2-2.el7.noarch
tfm-rubygem-friendly_id-5.1.0-4.el7.noarch
tfm-rubygem-responders-2.4.0-1.el7.noarch
tfm-rubygem-roadie-rails-1.2.1-1.el7.noarch
tfm-rubygem-webpack-rails-0.9.8-2.el7.noarch
tfm-rubygem-rabl-0.13.1-1.el7.noarch
tfm-rubygem-excon-0.58.0-2.el7.noarch
tfm-rubygem-foreman_noenv-0.0.7-2.fm1_17.el7.noarch
tfm-rubygem-foreman_noenv-doc-0.0.7-2.fm1_17.el7.noarch
tfm-rubygem-logging-2.2.2-1.el7.noarch
tfm-rubygem-graphite-api-0.1.5-5.el7.noarch
tfm-ror51-rubygem-nokogiri-1.8.1-2.el7.centos.x86_64
tfm-rubygem-passenger-4.0.18-9.12.el7.x86_64
tfm-rubygem-get_process_mem-0.2.1-2.el7.noarch
tfm-ror51-rubygem-sprockets-3.7.1-2.el7.centos.noarch
tfm-rubygem-facter-2.4.0-5.el7.x86_64
tfm-rubygem-bundler_ext-0.4.1-2.el7.noarch
tfm-rubygem-unf_ext-0.0.6-7.el7.x86_64
tfm-rubygem-rack-jsonp-1.3.1-6.el7.noarch
tfm-rubygem-daemons-1.2.3-4.el7.noarch
tfm-rubygem-formatador-0.2.1-10.el7.noarch
tfm-rubygem-deacon-1.0.0-2.el7.noarch
tfm-ror51-rubygem-websocket-driver-0.6.5-3.el7.centos.x86_64
tfm-ror51-rubygem-mini_mime-1.0.0-2.el7.centos.noarch
tfm-ror51-rubygem-mime-types-3.1-2.el7.centos.noarch
tfm-ror51-rubygem-mustermann-1.0.1-2.el7.centos.noarch
tfm-ror51-rubygem-activemodel-5.1.4-3.el7.centos.noarch
tfm-rubygem-will_paginate-3.1.5-2.el7.noarch
tfm-ror51-rubygem-turbolinks-2.5.4-2.el7.centos.noarch
tfm-rubygem-record_tag_helper-1.0.0-1.el7.noarch
tfm-rubygem-foreman_default_hostgroup-4.0.1-1.fm1_17.el7.noarch
tfm-rubygem-foreman_hooks-0.3.14-2.fm1_17.el7.noarch
tfm-rubygem-safemode-1.3.5-1.el7.noarch
tfm-rubygem-zscheduler-0.0.6-4.el7.noarch
tfm-rubygem-net-ldap-0.15.0-2.el7.noarch
tfm-rubygem-net-scp-1.2.1-2.el7.noarch
tfm-ror51-rubygem-i18n-0.9.1-3.el7.centos.noarch
tfm-ror51-rubygem-rack-protection-2.0.0-2.el7.centos.noarch
tfm-rubygem-polyglot-0.3.5-1.el7.noarch
tfm-rubygem-dynflow-0.8.37-2.el7.noarch
tfm-ror51-rubygem-tzinfo-1.2.4-3.el7.centos.noarch
tfm-ror51-rubygem-loofah-2.1.1-3.el7.centos.noarch
tfm-ror51-rubygem-erubi-1.7.0-2.el7.centos.noarch
tfm-ror51-rubygem-actionmailer-5.1.4-3.el7.centos.noarch
tfm-rubygem-ancestry-3.0.0-2.el7.noarch
tfm-ror51-rubygem-rails-5.1.4-4.el7.centos.noarch
tfm-rubygem-foreman-tasks-0.11.2-1.fm1_17.el7.noarch
tfm-runtime-4.0-1.el7.x86_64
tfm-rubygem-sexp_processor-4.10.0-4.el7.noarch
tfm-rubygem-oauth-0.5.4-2.el7.noarch
tfm-rubygem-domain_name-0.5.20160310-2.el7.noarch
tfm-rubygem-net-ping-2.0.1-2.el7.noarch
tfm-rubygem-roadie-3.2.2-1.el7.noarch
tfm-rubygem-multi_json-1.12.2-2.el7.noarch
tfm-ror51-rubygem-nio4r-2.1.0-2.el7.centos.x86_64
tfm-ror51-rubygem-coffee-script-2.4.1-2.el7.centos.noarch
tfm-ror51-rubygem-sprockets-rails-3.2.1-2.el7.centos.noarch
tfm-ror51-rubygem-actionpack-5.1.4-3.el7.centos.noarch
tfm-rubygem-activerecord-session_store-1.1.0-3.el7.noarch
tfm-rubygem-x-editable-rails-1.5.5-2.el7.noarch
tfm-rubygem-apipie-rails-0.5.6-2.el7.noarch
tfm-rubygem-fog-core-1.45.0-2.el7.noarch
tfm-rubygem-foreman_default_hostgroup-doc-4.0.1-1.fm1_17.el7.noarch
tfm-rubygem-apipie-bindings-0.2.2-1.el7.noarch
tfm-rubygem-passenger-native-4.0.18-9.12.el7.x86_64
tfm-ror51-rubygem-rack-2.0.3-2.el7.centos.noarch
tfm-ror51-rubygem-multi_json-1.12.2-2.el7.centos.noarch
tfm-rubygem-ruby2ruby-2.4.0-1.el7.noarch

Let me know if you need any more infos for debugging.

@timogoebel
Copy link
Member

Actually, I don't want to maintain the puppetdb dashboard any longer. Proxying this through foreman is a heck of a hack.
What do you guys use this for? Maybe we can find a sane alternative to this.

@treydock
Copy link
Member

treydock commented Jun 4, 2018

Personally I used the proxied dashboard in Foreman as the way to view the dashboard to just get a sense of things in PuppetDB. I only exposed the non-SSL port for PuppetDB to Foreman server for purposes of viewing the dashboard. If the metrics in dashboard could be accessed via PuppetDB API, then can imagine just building a new dashboard based on those collected values.

@timogoebel
Copy link
Member

If the metrics in dashboard could be accessed via PuppetDB API, then can imagine just building a new dashboard based on those collected values.

@treydock: I believe they are exposed via API. Can you name the parameters you'd want to see in the dashboard?

@treydock
Copy link
Member

treydock commented Jun 4, 2018

  • JVM Heap
  • Active Nodes
  • Inactive Nodes
  • Command Processing (sec/command & command/sec)
  • Enqueueing
  • Command Persistence
  • Collection Queries

The fact they all show as graphs with some amount of history is useful but can imagine would be challenging in Foreman unless this plugin resorted to storing historical metrics in the database in a way they didn't grow infinitely. Having just real-time numbers would still be useful though, especially the timing related metrics and JVM Heap. I don't know enough about the resource duplication and catalog duplication to know their usefulness so left those out of the list.

@HristoMohamed
Copy link

Just wanted to let know, that I applied the same fix to Foreman 1.18 and it works there as well.

@alexjfisher
Copy link

@timogoebel Did you have any more thoughts on this? Not that I really use this feature much (I've only just noticed it's broken!)

@timogoebel
Copy link
Member

@alexjfisher: I believe the best approach would be to drop this feature for now. It's too much of a hack imho.

@alexjfisher
Copy link

Sure. Removing the feature is preferable to it being there but broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants