Chapter 49. --stats-archiv
Prev |  | Next

# Chapter 49. --stats-archiv

Wojciech Kapcia <wojciech.kapcia@tigase.org> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net/ :Date: 2014-06-10 18:21

Default value:

Example: `--stats-archiv=tigase.stats.CounterDataFileLogger:stats-file-logger:60,tigase.stats.CounterDataLogger:stats-logger:60`

Possible values: comma separated list of statistics archivizers: `<class>:<name>:<frequency>`

Description: `--stats-archiv` configuration property allow enabling and configuring components responsible for storing statistic information. As a parameter it takes comma separated list of all archivizers that we want to enable. Each entry follows same pattern: <class>:<name>:<frequency>, where:

- <class> - is the class of any archivizer implementing `tigase.stats.StatisticsArchivizerIfc` interface
- <name> - is name of particular archivizer under which it will be identified in Tigase
- <frequency> - is the time interval between subsequent execution of the archivizer `.execute()` method (in seconds).

Currently following archivizers classess are available:

- `tigase.stats.CounterDataArchivizer` - every execution put current basic server metrics (CPU usage, memory usage, number of user connections, uptime) into database (overwrites previous entry);
- `tigase.stats.CounterDataLogger` - every execution insert new row with new set of number of server statistics (CPU usage, memory usage, number of user connections per connector, number of processed packets of different types, uptime, etc) into the database
- `tigase.stats.CounterDataFileLogger` - every execution store all server statistics into separate file.

It’s possible to configure each archivizer by adding following entry to the `etc/init.properties` file:

    <statistics_component_name>/stats-archiv/<name>/<property>=<value>

For example, if we want to enable CounterDataFileLogger that stores statistics every 60 seconds:

    --stats-archiv=tigase.stats.CounterDataFileLogger:stats-file-logger:60

We can configure it further with following options:

    stats/stats-archiv/stats-file-logger/stats-directory=logs/server_statistics
    stats/stats-archiv/stats-file-logger/stats-filename=stat
    stats/stats-archiv/stats-file-logger/stats-unixtime=false
    stats/stats-archiv/stats-file-logger/stats-datetime=true
    stats/stats-archiv/stats-file-logger/stats-datetime-format=HH:mm:ss
    stats/stats-archiv/stats-file-logger/stats-level=FINE

which configures accordingly: directory to which files should be saved, filename prefix, whether to include or not unix timestamp in filename, whether to include or not datetime timestamp, control format of timestamp (using java DateFormat pattern) and also set level of the statistics we want to save (using java Logger.Level)

Available since: 5.2.0

Prev |  | Next
Chapter 48. --ssl-def-cert-domain | Home | Chapter 50. --stats-history