Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.
/ dashML Public archive

create responsive, lightweight dashboards with MarkLogic 7

License

Notifications You must be signed in to change notification settings

xquery/dashML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dashML v0.1

dashML is built with RXQ and included in that repo as an example of building RESTful apps with MarkLogic.

I thought it would be fun to cook up a little bauble that leverages new features found in MarkLogic 7.

MarkLogic 7.0 introduces more tools for monitoring the performance of your MarkLogic server. dashML leverages these tools to make it easy to create lightweight, dashboards giving you up-to-date information on the health and performance of your applications.

dashML provides a tabbed interface of MarkLogic server history monitoring metrics. dashML

This provides a snapshot of the health of your server which you can view on your smart phone, tablet or any browser that supports responsive templates.

Requirements

MarkLogic 7.0 (latest version)

To install

First, you need to download and install MarkLogic 7.

Second, create an appserver, providing the following details;

  • root: provide directory where dashml/src/xquery was copied to your filesystem (ex. /opt/dashml/src/xquery)
  • port: choose a port ####
  • set database: set to Meters database
  • set error handler: /rxq-rewriter.xqy?mode=error
  • set rewrite handler: /rxq-rewriter.xqy?mode=rewrite

If you are installing on a brand new ML7 instance, you may have to wait a little while to give a chance for some metrics to be collected before building (and viewing) dashboards.

With everything setup, you can now point your web browser to http://localhost:#### (where ### is the port number you choose when setting up appserver) and you should see dashML homepage.

Click onto instructions tab or go direct to building dashboards.

Using dashML

Just goto http://localhost:####/instructions

then start building simple dashboards.

To install/run tests

create an appserver, providing the following details;

  • root: provide directory where dashml/src ison your filesystem
  • port: choose a port ####
  • set database: set to Meters database
  • amend src/test/dash-model line 59 to point to full path where etc/dash.xsd is

Now point your web browser to http://localhost:####/xray which will run all tests.

FAQ

  • 'X is not working' - make sure you have run long enough for meters to be generated (or switch to last 60 minutes)
  • submit an issue

TODO

some thoughts on future features

  • make widgets and dash standalone (consume json endpoints)
  • add resource selection
  • different widget types
  • add replica to database
  • customise everything (colors, etc)
  • reordering
  • add thresholds for alerting
  • add start & end selection

Caveat Emptor

  • time constraints = quick code generate ('though there are some xray unit tests' he says in a hopeful tone ...)
  • I made GET do bad things (as in not idempotent)
  • no error checking (other then schema validation)
  • probably a long list of other things done poorly ...

License

dashML is released under Apache License, Version 2.0

More Info on technologies

The following are links on the other technologies used in this application.

The usage of RESTXQ annotations turns out to be a very concise way of building up flexible RESTFul interfaces, as well as providing the basis from which to create MVC architectures for our XQuery web applications.

About

create responsive, lightweight dashboards with MarkLogic 7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published