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

Not working (stale information, information does not updated) after icinga2 update to version 2.11 #83

Closed
MarkYSA opened this issue Oct 9, 2019 · 5 comments · Fixed by #84
Assignees
Labels
Milestone

Comments

@MarkYSA
Copy link

MarkYSA commented Oct 9, 2019

Hi.

In log I see the following:

scheduler caught exception:
undefined method first' for nil:NilClass /usr/share/dashing-icinga2/lib/icinga2.rb:603:in fetchVersion'
/usr/share/dashing-icinga2/lib/icinga2.rb:665:in run' /usr/share/dashing-icinga2/jobs/icinga2.rb:27:in block in <top (required)>'
/usr/local/share/gems/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in call' /usr/local/share/gems/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in trigger_block'
/usr/local/share/gems/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in block in trigger' /usr/local/share/gems/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in call'
/usr/local/share/gems/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'

Your Environment

  • dashing (1.3.7)
  • ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
    commit 99d1d00
    Merge: ed4bd04 1e344ed
    Author: Michael Friedrich [email protected]
    Date: Tue Oct 8 19:21:57 2019 +0200
  • Modifications to this project, if any (git diff): NO
  • Operating System and version: CentOS 7.7.1908
  • Client browser and version: Chrome/Firefox latest
@MarkYSA MarkYSA changed the title Not working after icinga2 update to version 2.11 Not working (stale information, information does not updated) after icinga2 update to version 2.11 Oct 9, 2019
@xElesde
Copy link

xElesde commented Oct 9, 2019

Hi

I seem to have the exact same Issue with my installation, updated icinga2 to 2.11 and now the dashing can't be started. Interestingly it starts on my system when I manually start it in foreground with environment variables.
ICINGA2_API_HOST=localhost ICINGA2_API_PORT=5665 ICINGA2_API_USERNAME=dashing ICINGA2_API_PASSWORD=**** dashing start

Environment

  • dashing (1.3.7)
  • ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
  • commit 99d1d00
    Merge: ed4bd04 1e344ed
    Author: Michael Friedrich [email protected]
  • Modifications to this project, if any (git diff): NO
  • Operating System and version: RedHat Enterprise Linux 7.7
  • Client browser and version: Chrome/Firefox latest

Output from dashing start -p 8005

/usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/thin/server.rb:107: warning: constant ::Fixnum is deprecated /usr/local/lib/ruby/gems/2.6.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:368: warning: constant ::Fixnum is deprecated First trying to read environment variables Environment variables not found, falling back to configuration file config/icinga2.json Detecting local config file '/usr/share/dashing-icinga2/config/icinga2.local.json'. Using config file '/usr/share/dashing-icinga2/config/icinga2.local.json'. bundler: failed to load command: thin (/usr/local/bin/thin) NoMethodError: undefined method []' for nil:NilClass
/usr/share/dashing-icinga2/lib/icinga2.rb:159:in getConfFile' /usr/share/dashing-icinga2/lib/icinga2.rb:89:in rescue in initialize'
/usr/share/dashing-icinga2/lib/icinga2.rb:84:in initialize' /usr/share/dashing-icinga2/jobs/icinga2.rb:23:in new'
/usr/share/dashing-icinga2/jobs/icinga2.rb:23:in <top (required)>' /usr/local/lib/ruby/gems/2.6.0/gems/backports-3.15.0/lib/backports/std_lib.rb:9:in require'
/usr/local/lib/ruby/gems/2.6.0/gems/backports-3.15.0/lib/backports/std_lib.rb:9:in require_with_backports' /usr/local/lib/ruby/gems/2.6.0/gems/dashing-1.3.7/lib/dashing/app.rb:171:in block in require_glob'
/usr/local/lib/ruby/gems/2.6.0/gems/dashing-1.3.7/lib/dashing/app.rb:170:in each' /usr/local/lib/ruby/gems/2.6.0/gems/dashing-1.3.7/lib/dashing/app.rb:170:in require_glob'
/usr/local/lib/ruby/gems/2.6.0/gems/dashing-1.3.7/lib/dashing/app.rb:181:in <top (required)>' /usr/local/lib/ruby/gems/2.6.0/gems/dashing-1.3.7/lib/dashing.rb:3:in require'
/usr/local/lib/ruby/gems/2.6.0/gems/dashing-1.3.7/lib/dashing.rb:3:in <top (required)>' config.ru:1:in require'
config.ru:1:in block in <main>' /usr/local/lib/ruby/gems/2.6.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in instance_eval'
/usr/local/lib/ruby/gems/2.6.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in initialize' config.ru:1:in new'
config.ru:1:in <main>' /usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in eval'
/usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in load' /usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:182:in load_rackup_config'
/usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:72:in start' /usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/thin/runner.rb:200:in run_command'
/usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/lib/thin/runner.rb:156:in run!' /usr/local/lib/ruby/gems/2.6.0/gems/thin-1.6.4/bin/thin:6:in <top (required)>'
/usr/local/bin/thin:23:in load' /usr/local/bin/thin:23:in <top (required)>'`

@dnsmichi
Copy link
Collaborator

Seems the version regex returns a null/nil value whereas the call the first/last then fails - from #81. Can you query the REST API manually and extract the /v1/status/IcingaApplication endpoint and post it here?

curl -k -s -u root:icinga 'https://localhost:5665/v1/status/IcingaApplication?pretty=1'

@MarkYSA
Copy link
Author

MarkYSA commented Oct 10, 2019

Thank you for the fast reply!

Output here:

{
"results": [
{
"name": "IcingaApplication",
"perfdata": [],
"status": {
"icingaapplication": {
"app": {
"enable_event_handlers": true,
"enable_flapping": true,
"enable_host_checks": true,
"enable_notifications": true,
"enable_perfdata": true,
"enable_service_checks": true,
"environment": "",
"node_name": "hidden",
"pid": 28711.0,
"program_start": 1570621608.853022,
"version": "2.11.0-1"
}
}
}
}
]
}

@dnsmichi
Copy link
Collaborator

Hmm, looks sane and in my tests, this version works as well. Can you both please share the content of the config/ directory? Please replace sensitive credentials.

@dnsmichi dnsmichi self-assigned this Oct 12, 2019
@dnsmichi dnsmichi added the jobs label Oct 12, 2019
@dnsmichi dnsmichi added this to the 2.1.0 milestone Oct 12, 2019
@dnsmichi
Copy link
Collaborator

I see, I made a programming mistake. I haven't coded Ruby for like a year now. The config reading is wrong with the new hard state option and old or local configs. Quickfix for you - add the new 'dashboard' option from the pull configuration file into the local modified version.

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

Successfully merging a pull request may close this issue.

3 participants