Code Monkey home page Code Monkey logo

dash-lightning's Introduction

dash-lightning

A demo of using JMX, Spring, and Dash to build an application monitoring dashboard.

Prerequisites

  1. Git
  2. Maven (comes with many Java IDEs)
  3. Java 8 SDK
  4. Create a Dash account. Note that the Push to Dash widgets require a Dash Pro or Dash Business account. A similar effect can be gained by creating REST endpoints similar to those in TomcatStatsController.java and using Fetch from URL widgets instead.

Running the demo

  1. Clone the dash-lightning repository on GitHub: git clone [email protected]:jerryorr/dash-lightning.git
  2. Create a new Dash dashboard.
  3. Create the following widgets in your Dash dashboard:
    1. Custom > Fetch from URL > Custom Speedometer and name it Memory Usage. For Data URL, enter http://[your public IP]:8080/stats/memory/speedometer. You can get your public IP by searching google for "my ip address". You may need to set up port forwarding and open up your firewall, depending on your network/router settings.
    2. Custom > Push to Dash > Basic Value (requires Dash Pro or Business account) and name it Active Sessions. Note the Push URL for later.
    3. Custom > Push to Dash > Custom Chart (requires Dash Pro or Business account) and name it whatever you want. Note the Push URL for later.
  4. Open src/main/resources/application.properties and enter the appropriate Push URL above for dash.chart and dash.sessions. Alternatively, set them as environment variables DASH_CHART_URL and DASH_SESSIONS_URL.
  5. In the root dash-lightning directory, run mvn spring-boot:run.
  6. Open http://localhost:8080/chart and play with the buttons.
  7. Check out your dashboard and see the magic! The Memory Usage widget will update every 30 seconds, the Active Sessions and chart widgets will update immediately.

dash-lightning's People

Contributors

jerryorr avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.