Jump to content
Greg.Buerk

Dashing on LabTech (as a Plugin)

Recommended Posts

In the interest of keeping conversations 'on topic' and easier to find in the forums...Can I politely request that we please create new topics for different issues. This is just the 'Intro' topic!

 

Thanks. (Sorry, Forum Police Alert!!) lol

Share this post


Link to post
Share on other sites

It has t be something other than the Dshing Pluign. The dashing plugin is reall not a Plugin but a front end for the Ruby dash to help configure it. The dashboards only use SQL to access data from the LOCAL MySQL.

 

It could be Mikes Ninite plugin and what could have happened is the ticket could have gone to a queue that has a rule that updating the ticket and then it sends it to LT and then LT calls AT again.

 

GET With LT Support to track this down.

Share this post


Link to post
Share on other sites

Greg;

 

Thanks for your insight. I will relay that info back to support. In short they were blaming the "unapproved" LT plugins. Thanks again.

Share this post


Link to post
Share on other sites

Ran the upgrade process but now dashing. just sits and says its running but cant get to any of the dashboards.

Get the cannot connect to server message when trying to get to the dashes no matter what port I try.

Share this post


Link to post
Share on other sites

Ok, Lets start Debugging this.

1. Are The Files There? Is the Ruby198 folder there.

2. Is the Ruby198\Dash folder created?

3. Are there Dashes in the Dash Folder?

4. If #1 then try to rebuild all files and check #2 again.

5. If #1-3 then is the ruby.exe running in the task manager?

6. Watch task man and see if Ruby.exe starts and stops?

 

Ok Now try to run the thing MANUALLY.

1. Stop DBAgent.

2. Open CMD Prompt.

3. Set PATH=C:\Ruby198\Bin;%PATH%

4. CD C:\Ruby198\Dash\YOURDASHBOARD

5. DASHING START

 

 

Diagnosing why a Ruby198 is not there. Start the DB Agnet. Look in the Windows\Temp folder for a dashing exe. Should be 80+mb. Once its downloaded its extracted to the C Drive. and then deleted.

 

See what the errors are. There has to be a clue here.

Share this post


Link to post
Share on other sites

1. yes the ruby folder is there but they are ruby193 not 198

2. yes it is created.

3. Dash folders with dash configs are in the dash folders.

4. ruby does start and stop.

 

When trying to start dashing manually

C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:133:in `to_ap

p': missing run or map statement (RuntimeError)

from config.ru:1:in `'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loa

der.rb:33:in `eval'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loa

der.rb:33:in `load'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers

/controller.rb:181:in `load_rackup_config'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers

/controller.rb:71:in `start'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:1

87:in `run_command'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:1

52:in `run!'

from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/bin/thin:6:in `

(required)>'

from C:/Ruby193/bin/thin:23:in `load'

from C:/Ruby193/bin/thin:23:in `'

Share this post


Link to post
Share on other sites

OK, that is a totaly wierd error. I would Stop the dbagent, delete the whole ruby193 folder. start the dbagent and see if that fixes it. It sounds like its the old copy of ruby and th enew dashing need newer gems and the like.

Share this post


Link to post
Share on other sites

Stopped the Dbagent deleted the folder and started it again. The plugin rebuilt the folder but still got the same message when trying to load it manually.

If I start the agent it shows that the server is running in the plugin but still can't browse to anything.

Share this post


Link to post
Share on other sites

hmmm, i dont know. If it cant run manuially then there is somethign missing from the ruby for your system. I really dont know.

 

Check to see if there is a C:\Windows\Temp\Dashing.exe file. If so Delete It and Let it build the Ruby193 folder again.

 

Also check your config table and amke sure the enabled is set to -1 and not 1.

 

DOES the NEW Plugin work for anyone??

Share this post


Link to post
Share on other sites

Looks like the C:\Windows\Temp\Dashing.exe isn't being created. Checked the config table and it is set at -1

 

So here is what ive tried so far.

Uninstalled dashing through the gem uninstall command and it shows both 1.1 and 1.2 were installed.

Re installed again and created a test dash through the command line it created and ran fine but if I let labtech do it through the plugin it gets the same error as before.

The Dashboard configs also don't have anything them when saved from the plugin just a -9999

Share this post


Link to post
Share on other sites

The new plugin doesn't work for me. Same issue as everyone else is seeing.

 

C:\Ruby193\dash\labtech>dashing start

c:/ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:133:in `to_app': missing run or map statement (RuntimeError)

from config.ru:1:in `'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'

from c:/ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.1/bin/thin:6:in `'

from c:/Ruby193/bin/thin:23:in `load'

from c:/Ruby193/bin/thin:23:in `'

Share this post


Link to post
Share on other sites

Man, i Just spun up a new LT Server. Windows 2008 64 bit and installed the plugin. It downloaded the dashing.exe and extracted the Ruby193 folder. It created the Dash and started it self no problem.

 

Now in my experiments i did see a Config of 1 and it dshould be -1 and i did have a OLD dashing.exe in the temp folder and since it was already there it extracted an OLD copy.

 

The File is downloaded from here http://www.labtechgeek.com/Files/Dashing.exe make sure it works.

Share this post


Link to post
Share on other sites

Ohhh a new test shows me the Templates table is Empty. I bet this is the problem

 

Here is a Manual Insert Command.

INSERT  INTO `plugin_labtech_dashing_template`(`TemplateID`,`Name`,`Data`,`NoAuto`) VALUES (2,'config.ru','require \'dashing\'\r\n\r\nconfigure do\r\n  set :auth_token, \'%AUTHTOKEN%\'\r\n\r\n  helpers do\r\n    def protected!\r\n     unless authorized?\r\n      response[\'WWW-Authenticate\'] = %(Basic realm=\"Restricted Area\")\r\n      throw(:halt, [401, \"Not authorized\\n\"])\r\n     end\r\n    end\r\n\r\n    def authorized?\r\n     @auth ||=  Rack::Auth::Basic::Request.new(request.env)\r\n     @auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [\'%USERNAME%\', \'%PASSWORD%\']\r\n    end\r\n  end\r\nend\r\n\r\nmap Sinatra::Application.assets_prefix do\r\n  run Sinatra::Application.sprockets\r\nend\r\n\r\nrun Sinatra::Application',1),(3,'config.ru','require \'dashing\'\r\n\r\nconfigure do\r\n  set :auth_token, \'%AUTHTOKEN%\'\r\n\r\n  helpers do\r\n    def protected!\r\n     # Put any authentication code you want in here.\r\n     # This method is run before accessing any resource.\r\n    end\r\n  end\r\nend\r\n\r\nmap Sinatra::Application.assets_prefix do\r\n  run Sinatra::Application.sprockets\r\nend\r\n\r\nrun Sinatra::Application',1),(4,'jobs\\jobfile.rb','require \'mysql\'\r\nrequire \'net/http\'\r\nrequire \'json\'\r\nrequire \'dbi\'\r\nrequire \'xmlsimple\'\r\nrequire \'tiny_tds\'\r\nrequire \'uri\'\r\nrequire \'nokogiri\'\r\nrequire \'htmlentities\'\r\nrequire \'simple-rss\'\r\nrequire \'open-uri\'\r\n\r\ndef climacon_class(weather_code)\r\n  case weather_code.to_i\r\n  when 0 \r\n    \'tornado\'\r\n  when 1 \r\n    \'tornado\'\r\n  when 2 \r\n    \'tornado\'\r\n  when 3 \r\n    \'lightning\'\r\n  when 4 \r\n    \'lightning\'\r\n  when 5 \r\n    \'snow\'\r\n  when 6 \r\n    \'sleet\'\r\n  when 7 \r\n    \'snow\'\r\n  when 8 \r\n    \'drizzle\'\r\n  when 9 \r\n    \'drizzle\'\r\n  when 10 \r\n    \'sleet\'\r\n  when 11 \r\n    \'rain\'\r\n  when 12 \r\n    \'rain\'\r\n  when 13 \r\n    \'snow\'\r\n  when 14 \r\n    \'snow\'\r\n  when 15 \r\n    \'snow\'\r\n  when 16 \r\n    \'snow\'\r\n  when 17 \r\n    \'hail\'\r\n  when 18 \r\n    \'sleet\'\r\n  when 19 \r\n    \'haze\'\r\n  when 20 \r\n    \'fog\'\r\n  when 21 \r\n    \'haze\'\r\n  when 22 \r\n    \'haze\'\r\n  when 23 \r\n    \'wind\'\r\n  when 24 \r\n    \'wind\'\r\n  when 25 \r\n    \'thermometer low\'\r\n  when 26 \r\n    \'cloud\'\r\n  when 27 \r\n    \'cloud moon\'\r\n  when 28 \r\n    \'cloud sun\'\r\n  when 29 \r\n    \'cloud moon\'\r\n  when 30 \r\n    \'cloud sun\'\r\n  when 31 \r\n    \'moon\'\r\n  when 32 \r\n    \'sun\'\r\n  when 33 \r\n    \'moon\'\r\n  when 34 \r\n    \'sun\'\r\n  when 35 \r\n    \'hail\'\r\n  when 36 \r\n    \'thermometer full\'\r\n  when 37 \r\n    \'lightning\'\r\n  when 38 \r\n    \'lightning\'\r\n  when 39 \r\n    \'lightning\'\r\n  when 40 \r\n    \'rain\'\r\n  when 41 \r\n    \'snow\'\r\n  when 42 \r\n    \'snow\'\r\n  when 43 \r\n    \'snow\'\r\n  when 44 \r\n    \'cloud\'\r\n  when 45 \r\n    \'lightning\'\r\n  when 46 \r\n    \'snow\'\r\n  when 47 \r\n    \'lightning\'\r\n  end\r\nend\r\n\r\nclass News\r\n  def initialize(widget_id, feed)\r\n    @widget_id = widget_id\r\n    # pick apart feed into domain and path\r\n    uri = URI.parse(feed)\r\n    @path = uri.path\r\n    @http = Net::HTTP.new(uri.host)\r\n  end\r\n\r\n  def widget_id()\r\n    @widget_id\r\n  end\r\n\r\n  def latest_headlines()\r\n    response = @http.request(Net::HTTP::Get.new(@path))\r\n    doc = Nokogiri::XML(response.body)\r\n    news_headlines = [];\r\n    doc.xpath(\'//channel/item\').each do |news_item|\r\n      title = clean_html( news_item.xpath(\'title\').text )\r\n      summary = clean_html( news_item.xpath(\'description\').text )\r\n      news_headlines.push({ title: title, description: summary })\r\n    end\r\n    news_headlines\r\n  end\r\n\r\n  def clean_html( html )\r\n    html = html.gsub(/<\\/?[^>]*>/, \" \ ")\r\n    html = Decoder.decode( html )\r\n    return html\r\n  end\r\n\r\nend\r\n\r\nDecoder = HTMLEntities.new\r\n\r\ncon = Mysql.new \'%SERVER%\', \'%USERNAME%\', \'%PASSWORD%\', \'labtech\'\r\n\r\n \r\n',1),(5,'dashboards\\dashboard.erb','\r\n<% content_for :title do %>%DASHBOARDNAME%<% end %>\r\n\r\n  \r\n \r\n%DASHBODY%\r\n\r\n  \r\n',1);

Share this post


Link to post
Share on other sites

You mean you click the Widget and it does not navigate to it? The Default widget is coded to go to 192.168.0.170 and you will need to change it.

 

The other dashes run on port 3032,3033,3034

Share this post


Link to post
Share on other sites

Hmmm.... Edit widget to correct address, save, reload config, widget disappears. Repeat on next widget same result. Try again and now all three widgets have gone but can still be clicked on :-(

Share this post


Link to post
Share on other sites

The SQL entry fixed mine sort of as well....

 

When I try the Add New Widget button. It clicks but does nothing. Any ideas?

 

I also changed the Welcome widget on the Labtech Dash to Weather and it is still showing as the Welcome widget

Share this post


Link to post
Share on other sites

You have to reload / rebuild I think.

There's definitely something odd going on when you edit though. On the previous version I made a small edit to remove references to tickets as we don't use them. The entire dashboard then shifted to the right and nothing would persuade it to move back :-(

 

On this version just changing the url on one widget made it invisible.

Share this post


Link to post
Share on other sites

I'm getting some weird issue where only a few black dots are showing on the top left of the browser. No widgets anymore. This even happens with the default widget page that I have not touched. Very weird.

 

Nevermind. Apparently it just took a while to load because it is working now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×