Monthly Archives: August 2014

bg_top

metric² for iPhone and SAP HANA

 

metric² for iPhone lets you monitor your SAP HANA instances from your phone showing you alerts, core resources and important metrics. Wherever you are.

As mentioned in my GitHANA article, developing on the metric² open source project has really provided some interesting use cases for me around SAP HANA. While it might not be as critical as ERP, BW or custom solution, the metric² demo system is used fairly regularly by people wanting to test drive the functionality. I recently had some server troubles and my HANA instances was down without me knowing. This promoted me to develop a small mobile app to monitor and ensure that my instance was available and running optimally. This is when metric² for iPhone was conceived and I started developing the free app.

 

 

The app is currently availble for iPhone, and I have a iPad version getting ready to be submitted to the App store. From a technical perspective the app uses a small XS file called mobileapi.xsjs which will need to be put in a package on your XSEngine instance to serve up the data to the app. You can specify how often you would like the data to be refreshed and specify multiple systems which you may need to monitor. (I have included my demo HANA instance as an example within the app so you can try it out.)

http://metric2.com/img/alerts2.png

 

The app is perfect for anyone running a HANA instance, be dev, test or production. It provides a really easy way to view the status of your system from anywhere using your iPhone. The app also downloads updates in the background and will notify you if any high alerts are experienced on the selected system, this is perfect for any sys admin/dba who will be to anticipate critical outages and be ready for the support calls.

A few features of the app

- View CPU, Disk, Memory consumption
- View open alerts
- Insights into your HANA instance quickly and from anywhere
- Add multiple HANA instances for monitoring
- Clean and simple UI for basic admin functions
- Push notifications for high alerts, when the app is in running background

Click here to find the GitHub project (of the mobileapi.xsjs file) and click here to check out the product page. This includes install instructions.

Technical Details

Building a native iOS (read Obj. C or Swift) which is integrated with SAP HANA is not terribly challenging and you really have 2 options for pulling or pushing data. Via a XSJS type file (like this app) or via a xsOData type of interface. Both have their pro’s and con’s but are fundamentally very similar. Below is a snippet of some of the code from my xsjs file and looks/acts very similar to what a regular AJAX call would use from a native XS app.

One of the biggest challenges for production users, like any intranet based resource, will probably be gaining access to the URL (mobileapi.xsjs) from outside the corporate net and will probably require a network admin to grant you access or configure (or reuse) a reverse proxy or firewall.

Screen Shot 2014-08-22 at 1.08.56 PM.png
Screen Shot 2014-08-22 at 1.12.40 PM.png
XCode iOS Pull Data Code
Screen Shot 2014-08-22 at 12.52.08 PM.png
SAP HANA XSJS Code serving data to the iOS app

Git-HANA-Screenshot

Git <> HANA – A free, open-source Github client for SAP HANA

Git-HANA-Screenshot.jpg

Over the last few months, working on the metric² open source project, I have been frequently updating the GitHub repo. As a heavy XS Web IDE user, this entailed exporting or copying the contents of the files from the package into my local GitHub repository for the project and subsequently committing the files from there. Since there is a small disconnect between the source (my HANA packages) and the destination (GitHub) I like to often see what changes which are due to be committed, the differences between the files, or just compare the files between the 2 systems.

Being over dedicated to building solutions to some of my workflow challenges (see here, here and here), I created yet another small HANA native app called Git <> HANA. The application allows you to compare files between your local HANA package and your (or any other) GitHub repo, and it also lets you commit files directly from the UI to GitHub, and vice-versa. If a file does not exists, it will create it for you (on either side). There are a couple other cool features which you can read about below, or watch the little video I created.

If you are a web IDE user it’s quick and convenient to use, and I am convinced it will make your HANA + GitHub integration easier (I am also hoping we will also see more open source native HANA apps on GitHub as a result!!!!)

Features of Git <> HANA

- Compare files between HANA and Github
- Compare inline or side by side
- Commit files from HANA to GitHub
- Commit/activate files from GitHub to HANA
- Repo/branch selection
- Native HANA application
- Easy HANA package installation
- Open source
- handles .xs* (e.g. .xsaccess, .xsapp) files (which your file system probably does not like!)
- Image comparison
- File browsing can be done via the GitHub repo or your HANA package

You can download the app package here (newsletter sign up requested so I can keep you up to date with the app) or check out the source files here.

If you think this would be helpful or would like to see any other features, or would like to contribute to the source … EXCELLENT, please just let me know

Screenshots

  

Use the HANA Package Browser or GitHub repository as a reference.

Push files from HANA to GitHub or from GitHub to your local HANA package.

Compare Files side by side, or inline

Package Install Instructions

- Download the package
- Open Lifecycle manager (http://<HANA_SERVER>:PORT/sap/hana/xs/lm/)
- Click on Import/Export menu
- Click Import from File
- Browse to the downloaded file
- Edit the index.html file and specify your github username/password (or leave it blank and enter these details using the settings)