Today I got an email from a colleague asking me for a copy of the SAP HANA DB Monitor Gadget. He wrote in the email that he was using it for years until he changed the laptop and the content is no longer available in the internal SAP space it was published in January 2012, in the early days of HANA 🙂 . To be honest, I developed and shared internally this simple gadget but I used it only for a few months until I forgot it.
This gadget is a very simple (but effective) tool that shows the status of the services within an SAP instance (like HANA DB). It talks to the sapstartsrv process running on the SAP server and retrieves the status of the services by consuming a Web Service.
The below graphic illustrate the process architecture within an SAP server.
There are different tools that talk to the sapstartsrv to retrieve information of the processes running and also to perform actions such as starting or stopping the server.
Some of the Web Service published but the sapstartsrv process does not require authentication, but some others (like start or stop) requires.
It was developed like a Windows Desktop Gadget, but according to Microsoft, Gadgets where discontinued in Windows 8 due to serious vulnerabilities and replaced by Start Screen Apps. ( Gadgets have been discontinued – Microsoft Windows)
The gadget uses standard technologies (AJAX, SOAP) and it sends a SOAP message to the server every XX seconds. Then it parses the response and sends again the message in a loop.
If you want to see the code, before using the gadget, you can rename the “.gadget” file to “.zip” and then extract the content into a folder. The Shell.html is the main file.
The GetProcessList function
The variable XML contains the SOAP message in the form it’s expected by the sapstartsrv. In the content, the <SAPControl:GetProcessList> indicates that the GetProcessList service it’s going to be consumed. This message does not require any parameter.
The next part that uses the xmlhttp object is used to perform a basic AJAX request.
The CallBack function
This function parses the response and builds the layout to display the services name in the color corresponding to the status
The procesos variable takes the items tags from the responseXML, then the loop builds a div for each service in the response.
This is a very light monitoring tool that combines HTML and Script to ping a HANA server and retrieve the status of all the services running in the instance (indexserver, nameserver, scriptserver, webdisp, etc etc).
As mentioned before, the Gadget is discontinued in Windows 8 and replaced for the Apps in the Start Screen, I hope someone like this tool and port it to other platform 🙂
The file is automatically uploaded as .zip. To have it running, unzip the file and remove the .txt extension so you have the SAP_HANA_Database_Services_Monitor.gadget