-
Notifications
You must be signed in to change notification settings - Fork 0
Time Series
Xyna Time Series is a Function Group of the Factory Warehouse that stores data points indexed by time. A typical example is the storage of traffic data to monitor bandwidth usage of a remote device.
Time Series can be managed with the services provided by the Application named "timeseries".
Each Time Series conceptually consists of a definition, one or more types of stored data and meta data. For example it is possible to store the same data in different resolutions by configuring several storage type instances.
A Time Series is defined by:
- A data source
- Name
- Type of the data (GAUGE/COUNTER)
- Validation data (minimum, maximum)
- One or more types of storage with corresponding configuration
- RRD (cf. http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html)
- Ring buffer length
- Precision
- Aggregation/Consolidation Function: AVERAGE, MIN, MAX, FIRST, LAST
- Date of first data
- Date of last data
RRD specifies several key configuration parameters that are different from the ones used in the API in Xyna. This section explains the mapping to the RRD parameters (official RRD documentation).
- step (corresponding to one primary data point): greatest common divisor of the precisions of all RRD storage definitions of the Time Series
- steps (corresponding to one consolidated data point): precision
- heartbeat: step times Xyna Property value (stepsizefactor, see below)
- rows: calculated from the ring buffer length parameter
The Service Group xnwh.timeseries.TimeSeriesManagement contains the following operations:
- Create Time Series
- Choosing of alternatives is always done by using the appropriate sub types
- StorageDefinition has sub type StorageDefinitionRRD
- DataAggregationType has sub types Average, Minimum, Maximum, First and Last
- TimeSeriesDataType has sub types Counter and Gauge
- Interval has sub types IntervalStartDuration and IntervalStartEnd
- Choosing of alternatives is always done by using the appropriate sub types
- Add Data
- Fetch Data (The returned data contains information about interval and precision because it may differ from the requested specification)
- Get Meta Data
- Get Definition
- Delete Time Series
The CLI contains the commands listtimeseries and deletetimeseries.
The following Xyna Properties are used by the storage type RRD:
- xnwh.timeseries.storage.rrd4j.directory.base: Path where RRD Archive files are stored (Default: storage/timeseries/rrd4j)
- xnwh.timeseries.storage.rrd4j.heartbeat.stepsizefactor: This stepsizefactor * minimum step size. (cf. Official RRD Documentation to understand what the heartbeat is for) (Default: 5)
- xnwh.timeseries.storage.rrd4j.cache.expiration: How long unused RrdDb entries are kept in memory (Default: 5 Min)
- xnwh.timeseries.storage.rrd4j.cache.sync.interval: How often cached RrdDb entries are persisted to file (Default: 5 Min)
- xnwh.timeseries.storage.rrd4j.cache.size: Maximum number of entries in cache (each entry corresponds to one open file descriptor) (Default: 1000)