You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

The information on this page refers to License Statistics v5.4 or newer, which changed specifications required for generating the XML file. If you are using an earlier version of License Statistics, please refer to the documentation for releases prior to v5.4.

If you use a different license server than one of those currently supported by License Statistics (see Supported license servers), you can customize License Statistics to run with your specific license server. To run License Statistics with your license server, your parser must write an XML file that License Statistics can read and understand. In this way, virtually any licensing system can communicate with License Statistics' graphing engine. 

See Adding and editing realtime license servers for information about adding a custom license server to License Statistics.

License Statistics will read your XML file at each update interval. You should generate the XML files on a regular, scheduled basis. You can schedule the XML file generation using Windows scheduler for Windows or crontab for Linux. Note that the custom parser is a realtime parser that contains the current state of the license server. When regenerating the XML, replace (do not append to) the previous XML file.

The specifications for the XML file are as follows: 

  • CUSTOM_STAT – required
    - VENDOR – required
  • USAGE – the usage of a single feature
    - FEATURE is required and indicates the name of the feature
    - VERSION – the version of the feature
    - USED_LICENSES – the sum of licenses used by users (including borrowed and reserved licenses)
    - DENIED_LICENSES – the sum of denied licenses
    - BORROWED_LICENSES – the sum of licenses borrowed by users
    - RESERVED_LICENSES – the sum of reserved licenses
    - TOTAL_LICENSES – "UNLIMITED" or numeric value of licenses in the feature
    - SHARE – specifies which type of license sharing in use
    - EXPIRES – "permanent" or the date on which the feature is set to expire

  • USER – the usage of the feature for a single user
    - USERNAME
    - HOSTNAME
    - IP – the user's IP address
    - USED_LICENSES – the number of licenses used by the user
    - DENIED_LICENSES – the number of licenses the user was denied
    - BORROW_ EXPIRE_TIME – if the used licenses are borrowed, this indicates the date when the borrow is due to expire
    - CHECKOUT_TIME – the date on which the user checked out the licenses

Important:

  1. USED_LICENSES and DENIED_LICENSES have to be located in separate USER entries.
  2. All dates and times must be in the following format: YYYY-MM-DD [HH:MM].
  3. Only one VENDOR name can be used.

An example of the content for a custom parser XML file is given below. 

<CUSTOM_STAT VENDOR="custom_testdev">
  <USAGE FEATURE="App1" VERSION="12.3" USED_LICENSES="2" TOTAL_LICENSES="100" BORROWED_LICENSES="1" SHARE="TEST" EXPIRES="2012-11-20">
    <USER USERNAME="user1" HOSTNAME="host1" IP="127.0.0.1" USED_LICENSES="1" CHECKOUT_TIME="2012-05-07 08:41"/>
    <USER USERNAME="user2" HOSTNAME="host2" IP="127.0.0.1" USED_LICENSES="1" BORROW_EXPIRE_TIME="2012-05-07 08:43" CHECKOUT_TIME="2012-05-07 08:41"/>
  </USAGE>
  <USAGE FEATURE="App2" VERSION="1.0" USED_LICENSES="1" DENIED_LICENSES="1" TOTAL_LICENSES="UNLIMITED" RESERVED_LICENSES="1" EXPIRES=”permanent”>
    <USER USERNAME="user1" HOSTNAME="host1" IP="127.0.0.1" USED_LICENSES="1" CHECKOUT_TIME="2012-05-07 08:41"/>
    <USER USERNAME="user1" HOSTNAME="host1" IP="127.0.0.1" DENIED_LICENSES="1" CHECKOUT_TIME="2012-05-07 08:41"/>
  </USAGE>
</CUSTOM_STAT>

It is important to understand that you validate all XML structure against the following XSD schema:

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="CUSTOM_STAT">
       <xs:complexType>
           <xs:sequence>
               <xs:element name="USAGE" maxOccurs="unbounded" minOccurs="0">
                   <xs:complexType>
                       <xs:sequence>
                           <xs:sequence>
                               <xs:element name="USER" maxOccurs="unbounded" minOccurs="0">
                                   <xs:complexType>
                                       <xs:simpleContent>
                                           <xs:extension base="xs:string">
                                               <xs:attribute type="xs:string" name="USERNAME" use="optional"/>
                                               <xs:attribute type="xs:string" name="HOSTNAME" use="optional"/>
                                               <xs:attribute type="xs:string" name="IP" use="optional"/>
                                               <xs:attribute type="xs:string" name="BORROW_EXPIRE_TIME" use="optional"/>
                                               <xs:attribute type="xs:string" name="CHECKOUT_TIME" use="optional"/>
                                               <xs:attribute type="xs:nonNegativeInteger" name="USED_LICENSES" use="optional"/>
                                               <xs:attribute type="xs:nonNegativeInteger" name="DENIED_LICENSES" use="optional"/>
                                           </xs:extension>
                                       </xs:simpleContent>
                                   </xs:complexType>
                               </xs:element>
                           </xs:sequence>
                       </xs:sequence>
                       <xs:attribute name="FEATURE" use="required">
                           <xs:simpleType>
                               <xs:restriction base="xs:string">
                                   <xs:minLength value="1"/>
                               </xs:restriction>
                           </xs:simpleType>
                       </xs:attribute>
                       <xs:attribute type="xs:float" name="VERSION" use="optional"/>
                       <xs:attribute type="xs:nonNegativeInteger" name="USED_LICENSES" use="optional"/>
                       <xs:attribute type="xs:nonNegativeInteger" name="DENIED_LICENSES" use="optional"/>
                       <xs:attribute type="xs:nonNegativeInteger" name="RESERVED_LICENSES" use="optional"/>
                       <xs:attribute type="xs:nonNegativeInteger" name="BORROWED_LICENSES" use="optional"/>
                       <xs:attribute type="xs:string" name="TOTAL_LICENSES" use="optional"/>
                       <xs:attribute type="xs:string" name="SHARE" use="optional"/>
                       <xs:attribute type="xs:string" name="EXPIRES" use="optional"/>
                   </xs:complexType>
               </xs:element>
           </xs:sequence>
           <xs:attribute name="VENDOR" use="required">
               <xs:simpleType>
                   <xs:restriction base="xs:string">
                       <xs:minLength value="1"/>
                   </xs:restriction>
               </xs:simpleType>
           </xs:attribute>
       </xs:complexType>
   </xs:element>
</xs:schema>


  • No labels