Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning
This page refers to functionality that has been removed from License Statistics. This information no longer applies to License Statistics v6.3 and newer.

The License Server Uptime endpoint delivers license usage metrics specific to license server status for the currently selected With License Statistics API, you can easily generate information about license server uptime, i.e. statistics about license server status for any license server during any period the server status was monitored. 

Obtaining information about license server status

If you want to retrieve information You can easily fetch metrics about license server status history, we recommend that you use by sending the following URL HTTP request template.

Code Block
linenumbers
languagejs
firstline1true
GET /api/v1/report/uptime/server/${licenseServerId}/json?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD}

where :- $ $ indicates a variable value that you can replace with a proper value, according to your needs
- the value that best suits your needs. The possible parameters are as follows:described below.

ParameterRequiredTypeDescription
${licenseServerId}Yesinteger

Specifies id of the feature which will be the subject of the report. 

Specifies ID of the Internal License Statistics identification of the license server for which you want to view the status information.  

sdYesstring

Specifies starting date from which you want to generate the report. The date and time format is as follows: YYYY-MM-DD, for example, 2015-01-20.

Specifies starting date from Start date for which you want to generate the report. The date and time format is YYYY-MM-DD; for example, 2017-01-20.  I know that it was written"date and time" but now I see that it is only a date

ed

Yes

string

Specifies end End date from for which you want to generate the report. Date format as above. Date is inclusive, meaning all data from the particular day will be included in the report.

Specifies end date from which you want to generate the report. The date and time format is YYYY-MM-DD; for example, 2017-01-20. The date is inclusive, meaning that all data from a particular day will be included in the report. As above

If your request is successful, you should see a response similar to the following: 

Code Block
languagejs
firstline1
linenumberstrue
  {
      success: ${success},
      msg: ${message},
      data: [{  
         "lsucd":${licenseServerUptimeCheckDateTime},
         "lssid":${licenseServerStatusId},
         "errid":${errorLogId}
      }],
	  "code": ${errorCode},
	  "totalCount": ${totalCount}
  }

where the response fields can be explained as follows:

...

success

...

boolean

...

Indicates whether the API request was successfully processed. 

...

string

...

Error message returned on failure.

...

lsucd

...

Date and time when License Statistics checked if license server was up.

...

lssid

...

integer

...

ID of license server status, which can be one of the following:

IDStatus
1UNKNOWN
2UP
3DOWN
4INTERNAL ERROR
5VERIFYING
6DISABLED

...

errid

...

integer

...

Id of error log.

ID of the entry in the License Statistics error log.

...

Error code if success == false

 

Error code for unsuccessful request.? Exactly

...

Count of all matching results.

Total number of all matching results.


This report supports only JSON format.

This report does not support standard options (filtering, limiting or ordering).

Response

On success, this report will contain one row for each event, such as query failure, server being disabled, successful query after period of failures, etc. See license server status descriptions for further details.

Each row consists of the following columns.

ColumnFull nameTypeDescription

lsucd

Timedate and time

Time when the event occurred.

lssid

Status Id

integer

Numeric value of license server status. See license server status descriptions for further details.

errmsg

Message

string

Optional message describing what went wrong.


Example

The following example shows a command that obtains information about the uptime of license server "1" in January 2017. Example
Say you would like to view information about uptime of license server 1 in January of 2015. To generate such data, enter a command similar to the following:

Code Block
languagejs
firstline1
linenumberstrue
curl --data "sd=20152017-01-01" --data "ed=20152017-01-31" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/server/1/json"

Keep in mind that you You can also put parameters directly in the URL, e.g. for an equivalent of the above:Keep in mind that you can also put parameters directly into the URL,e.g. to generate data for . For the above example, the command would look like this:the following.

Code Block
languagejs
firstline1
linenumberstrue
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/server/1/json?sd=20152017-01-01&ed=2015-01-31"

Obtaining information about error messages

If you want to retrieve information about error message of any given log, we recommend that you use the following URL request template. 

Code Block
languagejs
firstline1
linenumberstrue
GET /api/v1/report/uptime/error/json?errid=${errorId}

where:

- $ indicates a variable value that you can replace with a proper value, according to your needs

- possible parameters are as follows: 

...

Specifies ID of the error log, for which the error message should be retrieved.

...

Code Block
languagejs
firstline1
linenumberstrue
 {
      success: ${success},
      msg: ${message},
      data: {
        "errmsg": ${errorMessage}
      },
      code: ${code}
 }

where the response fields can be explained as follows:

...

boolean

...

Indicates whether the API request was successfully processed.

...

string

...

License Statistics error message returned on failure.

...

string

...

Requested message for the error log.

The message you want to generate for a specific error log.? I think it is more of a retrieve rather than generate

...

Error code if success == false

Error code for unsuccessful request.? Yup

...

For example, say you would like to know what was message of error 1. To generate such data, enter a command that is similar to the following:

Code Block
languagejs
firstline1
linenumberstrue
curl --data "errid=1" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/error/json"

Similarly, as in the case of license server uptime, you can also put parameters directly in the URL, f.e for an equivalent of the above:

Code Block
languagejs
firstline1
linenumberstrue
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/error/json?errid=12017-01-31"