Metric² is a web based, realtime dashboarding platform for SAP HANA, on SAP HANA.I recently gave a demo of the app at Demojam in Las Vegas (You can read my blog post about the event here). Metric² is a free app/download and this blog gives some insight into how it works, and how you can download and install it in your own HANA system:
Metric² is made up of 3 key areas:
Dashboards: Metric² can have multiple dashboards. Dashboards are designed as blank canvases, are quite flexible, and can contain widgets which are added can be simply dragged and dropped into their needed locations and also sized accordingly.
Widgets: Dashboards can have multiple widgets displayed. There are a variety of widgets including a range of predefined datasources (CPU, Memory, Disk etc.) but also include custom widgets (SQL, JSON, Yahoo) which can display a myriad of information to your team.
Alerts: Certain widgets can have alerts “attached” to them, when the value meets the conditions, the alert is logged and displayed.
- Why realtime? The intent is to be proactive about your systems or applications health, having the Metric² dashboards up on a large format monitor ensures that everyone is well aware of how your system is performing, and more importantly, when it is not.
- Why Web Based? While I personally prefer Native/Traditional/Window types apps, having Metric² run as a web app (using SAPUI5) means it can be used and displayed on a variety of devices and formats.
- Why do you call it a platform? Its more than just a bunch of metrics, everything is customizable, you can create your own widgets, your own dashboards and alerts, it also acts as a large data warehouse for any of the data you are monitoring/tracking, taking it past being an app, to a small platform which you can build, and extend upon.
This was an interesting dilemma for me, I wanted to keep the app as simple as possible by not requiring that admins install *any* additional components (thus deemed as a “Native” XS HANA app). It has a DB schema which Metric² needs to have present, and subsequently a set of files which get installed in the content repository via a package.
This lead to an interesting challenge, because the XS Engine did not support web sockets for “true” realtime app runtime, the app uses timers and HTTP polling to fetch the data from the backend system (read xsjs file). This is less than perfect. I have high hopes that SPS7 will include WebSocket support and we can start writing true realtime web apps directly on XS Engine. Another alternative is the recent availability of Node.js library for HANA, while its awesome, still requires additional components outside of the core HANA platform.
The app is based on a “Fiori” themed SAP UI5 foundation. I also used a variety of JQuery add-on’s to help (read: not reinvent the wheel) with the display of the data. I also used the standard D3 visualization library of UI5 along with a helper class called NVD3 which is very useful in simplifying the D3 charting experience.
– Currently the app does not support multiple users.
– Browser support … currently its developed for Firefox only, but does not look too bad on Safari or Chrome (CSS Changes needed).
– The polling aspect, because the data is being fetched from your XSJS file and returned to the main page, I am constantly having to eval the returned code to update the chart widgets. Eval is Evil
– Widget history: Because widgets are being polled, if the screen is not open, it will not capture any historical data. Not very useful for troubleshooting.
I am currently working on porting the app to support the realtime abilities. Planning on a new theme (not so much Fiori like) to make it a little more differentiated. Also planning on adding a few more predefined widgets (suggestions welcomed!!!).
Here (Its a free beta, all I ask is to sign up for a Metric² newsletter)
- Import the Metric² Package to the content repository in XS Engine (This can be done via Web or Studio)
- Open http://YOURIP:8000/sap/hana/xs/ide/
- Click on the Delivery Unit Menu and then Import Delivery Unit From File System
- Select the downloaded/unzipped file (REPO_20131109-203950826-HDB–METRIC2.tgz)
- Run the Install script (InstallScript.sql) for the DB which is included in the download – This can be done in either HANA Studio or the Web IDE
- Optional: Run the Overview dashboard script (Overview Dashboard.sql) from here to give you a sample dashboard – This can be done in either HANA Studio or the IDE
- Open your browser to http://YOURIP:8000/lilabs/metric2/Index.html
– Optional: Predictive Analytics: You may need to enable PAL on your server in order to use the libraries and forecasting feature under some of the widgets.
– The ping response widget is not functional currently
– The Total CPU reported on the “System overview” widget should be converted to a legitimate percentage (0 – 100%) as SLES displays a summed percentage of all the CPU’s.
– The Map of the US Widget – coordinates are not accurate, they need an offset due to the images size and padding within the widget
– The dashboard itself is not fully responsive, when displaying on an iPad the view is often too small to display all the widgets
– There is no mail server functionality built into XSEngine, so alerts are only displayed on the monitor and in the notifications area on the right of the screen.
You can submit an issue log on my website making it easier to track, share, resolve: http://blog.li-labs.com/issue-log/
Vishal Sikka made a humorous reference at the Las Vegas Keynote to a certain “Pre-release” Beta product, so I am going to do the same This version of Metric² is a “Prerelease” beta 🙂 please use and test it thoroughly in your development environment.
Stay up to date:
Please head over to http://www.metric2.com and signup for the newsletter, this way I can stay in touch with people interested in learning more.
This software is provided as is, and with no warranty. You may copy, modify and share the code for personal purposes. You may not sell or include, any parts, or as a whole, the software. Please share the download via the URL provided – Thanks.
If you install Metric² and build an interesting dashboard, please tweet or share it in the comments. Also if you find any errors or issues on the installation process, please let me know and I will gladly update this guide. Thanks 🙂