Search code examples
ibm-mobilefirstworklight-server

What is the expected behavior of using the Worklight 6.2 vitality queries to validate an application?


I am attempting to use the Worklight server vitality query to validate that an application is installed on the Worklight server which is documented here http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.monitor.doc/admin/r_vitality_query.html

In a browser I am accessing this URL http://localhost:10080/WLHealth/ws/rest/vitality?app=somedummyapp

I believe the proper response from the server would contain an ALERT element that indicates that the application "somedummyapp" isn't installed in the server. (Which it isn't)

Instead I am getting the following response:

<ROOT>
<ALERT>
<DATE>2014-10-09T22:48:47.381-0400</DATE>
<EVENTID>0</EVENTID>
<SYSTEM>WRKL</SYSTEM>
<SUBJECT>SRV</SUBJECT>
<COMPUTER>192.168.1.6</COMPUTER>
<DESCRIPTION>Server is running</DESCRIPTION>
</ALERT>
<ALERT>
<DATE>2014-10-09T22:48:47.381-0400</DATE>
<EVENTID>0</EVENTID>
<SYSTEM>WRKL</SYSTEM>
<SUBJECT>APPL</SUBJECT>
<COMPUTER>192.168.1.6</COMPUTER>
<DESCRIPTION>Application 'somedummyapp' is deployed</DESCRIPTION>
</ALERT>
<ALERT>
<DATE>2014-10-09T22:48:47.381-0400</DATE>
<EVENTID>0</EVENTID>
<SYSTEM>WRKL</SYSTEM>
<SUBJECT>BUILD</SUBJECT>
<COMPUTER>192.168.1.6</COMPUTER>
<DESCRIPTION>6.2.0.00.20140915-1601</DESCRIPTION>
</ALERT>
</ROOT>

Solution

  • As my comment states above I believe you have encountered a defect in regards to the "Application 'somedummyapp' is deployed" description that the vitality check is outputting. I have opened a defect internally, but below I can show you what the expected result would be for an application that is not deployed:

    If the application "somedummyapp" was not deployed to the server and you accessed the following URL:

    http://localhost:10080/WLHealth/ws/rest/vitality?app=somedummyapp
    

    An Alert would appear in the response with the following output:

    -<ALERT>
         <DATE>2014-10-14T14:02:43.601-0400</DATE>
         <EVENTID>2</EVENTID>
         <SYSTEM>WRKL</SYSTEM>
         <SUBJECT>APPL</SUBJECT>
         <COMPUTER>{IP_ADDRESS}</COMPUTER>
         <DESCRIPTION>Application 'somedummyapp' is not deployed</DESCRIPTION>
     </Alert>
    

    As you can see the EVENTID would be set to "2" for a not deployed application. The DESCRIPTION would then be set to "Application 'somedummyapp' is not deployed".