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

dashing don't show any result #9

Closed
ClemensBW opened this issue Jan 25, 2017 · 7 comments · Fixed by bodsch/ruby-icinga2#7 or #25
Closed

dashing don't show any result #9

ClemensBW opened this issue Jan 25, 2017 · 7 comments · Fixed by bodsch/ruby-icinga2#7 or #25
Assignees
Milestone

Comments

@ClemensBW
Copy link

Hello,

I get a fresh git clone from dashing tool, change the config/icinga2.json file and start the tool.
The dashlet is reachable with my browser, but without any icinga2 api result data.

The API user credentials are correct, a curl test with the icinga2 api works fine.

Only debug found in log/thin.log

/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/request.rb:215:in `execute'
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/request.rb:52:in `execute'
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/resource.rb:67:in `post'
/usr/share/dashing-icinga2/lib/icinga2.rb:192:in `getHostObjects'
/usr/share/dashing-icinga2/lib/icinga2.rb:435:in `run'
/usr/share/dashing-icinga2/jobs/icinga2.rb:27:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.3/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
/usr/local/rvm/gems/ruby-2.3.3/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
/usr/local/rvm/gems/ruby-2.3.3/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
================================================================================



10.X.47 - - [25/Jan/2017 23:43:15] "GET /events HTTP/1.1" 200 - 31.6190
10.X.47 - - [25/Jan/2017 23:43:15] "GET /icinga2 HTTP/1.1" 200 4405 0.0150
10.X.47 - - [25/Jan/2017 23:43:16] "GET /views/meter.html HTTP/1.1" 200 336 0.0008
10.X.47 - - [25/Jan/2017 23:43:16] "GET /views/list.html HTTP/1.1" 200 609 0.0006
10.X.47 - - [25/Jan/2017 23:43:16] "GET /views/simplemon.html HTTP/1.1" 200 223 0.0006
10.X.47 - - [25/Jan/2017 23:43:16] "GET /views/iframe.html HTTP/1.1" 200 52 0.0007
================================================================================
scheduler caught exception:
Server broke connection
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/request.rb:780:in `rescue in transmit'
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/request.rb:698:in `transmit'
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/request.rb:215:in `execute'
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/request.rb:52:in `execute'
/usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-2.0.0/lib/restclient/resource.rb:67:in `post'
/usr/share/dashing-icinga2/lib/icinga2.rb:192:in `getHostObjects'
/usr/share/dashing-icinga2/lib/icinga2.rb:435:in `run'
/usr/share/dashing-icinga2/jobs/icinga2.rb:27:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.3/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
/usr/local/rvm/gems/ruby-2.3.3/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
/usr/local/rvm/gems/ruby-2.3.3/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
================================================================================
[...]

Icinga2 looks fine:

[2017-01-25 23:43:16 +0100] information/HttpServerConnection: Request: GET /v1/objects/hosts (from [10.X]:33748, user: dashing)
[2017-01-25 23:43:22 +0100] information/HttpServerConnection: Request: GET /v1/status/IcingaApplication (from [10.X]:33749, user: dashing)
[2017-01-25 23:43:22 +0100] information/HttpServerConnection: Request: GET /v1/objects/hosts (from [10.X]:33750, user: dashing)
[2017-01-25 23:43:26 +0100] information/HttpServerConnection: Request: GET /v1/status/IcingaApplication (from [10.X]:33751, user: dashing)
[2017-01-25 23:43:26 +0100] information/HttpServerConnection: Request: GET /v1/objects/hosts (from [10.X]:33752, user: dashing)
[2017-01-25 23:43:31 +0100] information/HttpServerConnection: Request: GET /v1/objects/services (from [10.X]:33753, user: dashing)
[2017-01-25 23:43:32 +0100] information/HttpServerConnection: Request: GET /v1/status/IcingaApplication (from [10.X]:33754, user: dashing)
[2017-01-25 23:43:32 +0100] information/HttpServerConnection: Request: GET /v1/objects/hosts (from [10.X]:33755, user: dashing)

Any Idea? :)
(we have a few more hosts and services, can this be a problem for the dashing tool?)

@dnsmichi
Copy link
Collaborator

Probably the connection was interrupted. Error handling inside the code is far from perfect, might need some additions. Patches welcome :)

The Ruby gem which is used for making API requests: https://github.com/rest-client/rest-client

@geoffhouse
Copy link

geoffhouse commented Mar 20, 2017

Looks like it might actually be a problem with the 'thin' webserver: Shopify/dashing#676

@dnsmichi
Copy link
Collaborator

I guess this could also be related to #7 ... though it sounds a bit hard to just change thin to puma or any other server.

@bodsch
Copy link
Contributor

bodsch commented May 25, 2017

i will help with the ruby problem. :)

@bodsch
Copy link
Contributor

bodsch commented Jun 11, 2017

the base ruby lib for icinga2 can't yet handle a reconnect. :(
i will implement this feature in my icinga2 gem and test this.
then i can create a PullRequest to the used lib.

@bodsch
Copy link
Contributor

bodsch commented Jun 20, 2017

i think, i found an workaround.
the test in my docker container works well.
now i can build an fix for this icinga2-lib

bodsch pushed a commit to bodsch/dashing-icinga2 that referenced this issue Jun 21, 2017
…node not available.

should be fix mocdaniel#9 and is an small backport from bodsch/ruby-icinga2#6
@dnsmichi dnsmichi added this to the 1.3.0 milestone Jun 24, 2017
@dnsmichi dnsmichi self-assigned this Jun 24, 2017
@dnsmichi
Copy link
Collaborator

I've adopted @bodsch 's patch into a cleaned up version which puts error handling in one place.

dnsmichi pushed a commit that referenced this issue Jun 24, 2017
…a class attributes

Patch is a mix of Bodo's work in #21 and my own fixes. Main difference
is that the api data handling now happens in just one place. Further I prefer
default initializers to long if-then-else statements (they're unreadable).

refs #21
fixes #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment