Jump to content
zubz

My Dashing NOC / HUD

Recommended Posts

Thought I'd share my screen with everyone. It's pretty custom for our company however PM me if you would like any details on any of the widgets / setup below.

 

I use the hotness widget but I added an additional section below the number which gives us the latest value from the sql query. The table widget I found online and customised it a little.

 

edit: I followed this post for the base Ubuntu Install . See my posts below on how to setup the Table dash
 

 

 

dash.png.2106a05c0bb72093bba17c860c8e47b2.png

Edited by zubz
Add ubuntu install link

Share this post


Link to post
Share on other sites

I guess the table is the least common one so I'll run through it here, If you've got Dashing installed (Linux setup - not plugin setup) I can help.

 

The below assumes you have dashing installed on a Linux server and the MySQL connector for labtech already configured. There is a sticky on the dashing forum on how to set this up.

 

First you need to install the table widget:

 

 dashing install 9c7cb3030f63ad10e517 
 

 

I then did some customisations with the table widget to change the colours a little, you can adjust the colours however you want.

Edit file widgets/table/table.scss

 

Change the colours at the top to this:

 

$background-color:  #000000;
$value-color:       #fff;

$title-color:       rgba(255, 255, 255, 0.7);
$label-color:       #e2e2e2;
$moreinfo-color:    rgba(255, 255, 255, 0.7);

$th-background-color:       #7c7979;
$tr-odd-background-color:   #704c4c;
$tr-even-background-color:  #8e3737;
$tr-hover-background-color: #858585;
 

 

And then for the icing on the cake - I will share with you my rb job file (I named it jobs/drv.rb). If you understand mysql you can tweak the filters at the end however you want.

 

The below excludes clients with audit plans and displays the following:

 

- 5% or lower free space

- 3GB or lower free space

- Less than 10% and less than 5GB (this is to account for small drives)

 

require_relative 'my_db.rb'

       SCHEDULER.every '60s', :first_in => 0 do |job|
               db = MyDb.conn
               sql = "SELECT
                               *
                       FROM
                               (
                               SELECT
                                       clients.name AS clientname,
                                       computers.NAME AS computerslist,
                                       letter,
                                       volumename,
                                       size,
                                       free,
                                       ROUND((free/size)*100) AS Percentfree,
                                       free AS RemainGB
                               FROM
                                       `v_drivesinternal` vr
                                       JOIN computers
                                               ON computers.computerid=vr.computerid
                                       JOIN v_extradatalocations ed
                                               ON computers.locationid=ed.locationid
                                       JOIN clients
                                               ON clients.clientid=computers.clientid
                               WHERE
                                       computers.os LIKE '%server%'
                                       AND vr.missing=0
                                       AND vr.model NOT LIKE '%Expansion%'
                                       AND ed.`Audit Plan` IN ('None','')
                               )AS Results
                       WHERE
                               size <> 0
                               AND free <> 0
                               AND (
                                       Percentfree < 6
                                       OR RemainGB < 3
                                       OR (PercentFree < 10 AND RemainGB < 5)
                               )
                       ORDER BY RemainGB ASC LIMIT 9"
               results = db.query(sql)


               servers = results.map do |row|
                       row = { cols: [ {class: 'left', value: row['clientname']}, {class: 'left',value: row['computerslist']}, {value: row['Letter']}, {value: row['RemainGB'].to_s + "(" + row['Percentfree'].to_s + "%)" } ] }
               end

               hrows = [ { cols: [ {class: 'left',value: 'Client'}, {class: 'left',value: 'Computer'},{value: 'Drive Letter'},{value: 'FreeSpace (MB)'} ] } ]

               send_event('drv', { hrows: hrows, rows: servers } )
 

 

In your /opt/dashing/rmm_hud/dashboards/home.erb - add the following: ( you can change the row/col ids if you like)

( My dashing is installed in /opt/dashing/rmm_hud/ )

 

    <li data-row="2" data-col="1" data-sizex="2" data-sizey="1">
      <div data-id="drv" data-view="Table" data-title="Drive Free Space Alerts" data-max="5"> </div>
   </li>
 

 

Restart your dashing service and you should now see the table. You may need to customise the layout.

sudo systemctl restart dashing.service

 

I don't have time to go through the hotness customisations right now - but seriously PM me if you're interested.

Edited by zubz
Fix code missing and update

Share this post


Link to post
Share on other sites

I've been getting a bit of people messaging me about this - Just thought I'd add my "Hotness w /sound" widget. 

 

image.png.809b22ee1715748a1c7bbf7d5fef4b62.png

This widget allows me to play a sound when the counter changes. 

See the 3 widget files attached. Place these in the folder /opt/dashing/rmm_hud/widgets/hotnesswsound

 

Place your Mp3 files in this folder:

/opt/dashing/rmm_hud/assets/images/mp3/

(the ERB file refers to this directory as /assets/mp3 (the /assets is an alias to the images directory)

 

in your /opt/dashing/rmm_hud/home.erb

You can use the widget like this:

     <li data-row="1" data-col="4" data-sizex="1" data-sizey="1">
          <div data-id="urgenttickets" data-view="Hotnesswsound" data-title="New Urgent Tickets" data-moreinfo="" data-valchangenotoksound="/assets/mp3/demonstrative.mp3" data-cool="0" data-warm="1"></div>
       </li>

Adjust the cool and warm values for when you want the sound to be played. (mine plays a sound at 1 and every increase after that) When it's 0 it's green.

 

I pull my urgent tickets from CW Manage. My jb file for urgent tickets looks like this:

require 'tiny_tds'



SCHEDULER.every '30s', :first_in => 0 do |job|


client = TinyTds::Client.new(:username => 'xxxxx', :password => 'xxxxxx', :host => 'xxxxxx', :database => 'xxxxx', :port => '1433')

rs = client.execute("Select
                        s.Ticketnbr,
                        s.status_description,
                        s.company_name,
                        s.Summary,
                        s.date_entered_utc,
                        s.minutes_waiting,
                        s.Urgency
                from
                        v_rpt_service s With (NOLOCK)
                        JOIN sr_service_calculated sc With (NOLOCK)
                                ON sc.SR_Service_RecID = s.TicketNbr
                WHERE
                        s.board_name like 'Team%Support'
                        and s.Closed_Flag = 0
                        and (s.date_responded_utc is null or s.status_description like 'New%')
                        and sc.SLA_Status_text <> 'Waiting'
                        and s.parent is null
                        and s.Urgency like 'Priority 1%'
                Order by date_entered_utc desc")
current_count = rs.count
if rs.count > 0
        resulttitle = rs.first['company_name']
        lastupdate = "#" + rs.first['Ticketnbr'].to_s
        else
        resulttitle = ""
        lastupdate = ""
        end

send_event('urgenttickets', { value: current_count, lasttitle: resulttitle, lastupdatevalue: lastupdate } )
 client.close

end

You will have to change the "WHERE" clause if you're going to use the above as the Board,Urgency and statuses might be different to your Manage environment. Also you will need to setup a SQL user to your CW database and add details in the jb file. (You can setup a limited access read only user) (Sorry no API calls with DASHING)

hotnesswsound.coffee

hotnesswsound.html

hotnesswsound.scss

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

×