Traffic usage statistics import is needed in case it is not possible for Parallels Business Automation - Standard to collect the needed traffic statistics automatically. For example, traffic statistics import can be used to control and bill traffic usage by dedicated servers, in the situation when traffic usage statistics are collected by some internal devices.
Below we describe all tags used in XML file to describe traffic usage statistics.
Tag |
Description |
|
The tag that always must open and close any XML file for data import in Parallels Business Automation - Standard. |
|
The tag that contains traffic statistics description. There can be only one <trafficstat> container per one XML file describing traffic statistics. All traffic statistics description is placed inside this tag. |
|
The tag that opens and closes the traffic statistics description for a particular server (node). All the tags described below are inside the <node> tag. |
|
The type of a server in terms of Parallels Business Automation - Standard. The value inside this tag can be one of the following:
|
|
A server (node) numerical identifier (ID) assigned in Parallels Business Automation - Standard during registration. |
|
The tag that contains description of one traffic statistics block. Contains: <interval>, <bytes>, <class>, <interface>. |
|
The tag that contains the starting and ending dates of traffic statistics collection period. Contains: <from>, <to> |
|
Traffic statistics collection starting date and time. |
|
Traffic statistics collection ending date and time. |
|
Traffic statistics for the specified period. Contains: <in>, <out>. |
|
Incoming traffic for the specified period, in bytes. |
|
Outgoing traffic for the specified period, in bytes. |
|
The number of traffic class the statistics was collected in. In terms of Parallels Business Automation - Standard, a traffic class number is called ID, but please do not mix this ID with numerical identifiers assigned to all objects in Parallels Business Automation - Standard. Traffic classes import is described in details earlier in this guide. |
|
The description of network adapter on a node traffic statistics was collected. You can use any denotation (e.g., eth0). |
Example of XML file for traffic usage statistics import:
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="import_traffic_stat.xsd">
<trafficstat>
<node>
<type>HN</type>
<id>4</id>
<data>
<interval>
<from>2005-06-29 12:21:23</from>
<to>2005-06-29 14:01:12</to>
</interval>
<bytes>
<in>111111123</in>
<out>1111111223</out>
</bytes>
<class>2</class>
<interface>eth0</interface>
</data>
<data>
<interval>
<from>2005-06-29 15:00:23</from>
<to>2005-06-29 16:01:12</to>
</interval>
<bytes>
<in>11131111</in>
<out>1114541111</out>
</bytes>
<class>2</class>
<interface>eth0</interface>
</data>
<data>
<interval>
<from>2005-06-29 16:21:23</from>
<to>2005-06-29 17:01:12</to>
</interval>
<bytes>
<in>113411111</in>
<out>111321111</out>
</bytes>
<class>2</class>
<interface>eth0</interface>
</data>
<data>
<interval>
<from>2005-06-29 16:21:23</from>
<to>2005-06-29 17:01:12</to>
</interval>
<bytes>
<in>33411111</in>
<out>441321111</out>
</bytes>
<class>3</class>
<interface>eth0</interface>
</data>
<data>
<interval>
<from>2005-06-29 16:21:23</from>
<to>2005-06-29 17:01:12</to>
</interval>
<bytes>
<in>53411111</in>
<out>541321111</out>
</bytes>
<class>4</class>
<interface>eth0</interface>
</data>
</node>
</trafficstat>
</data>