Start a conversation

Exporting User Statistics into CSV

Overview

When there is a need to review the statistical data in a non-standard format, for example, CSV instead of PDF, Kerio Control statistics can be accessed through internal files.

Save as PDF using the Print feature

Screen_Shot_2020-12-23_at_4.30.35_PM.png

Screen_Shot_2020-12-23_at_4.31.22_PM.png

The STaR data is saved in /var/winroute/star folder. Afterward, the database values can be converted into the required format.

This article provides details on how to view and export User Statistical data.

Prerequisites

Download and unzip Firebird-2.0.7.13318-0 compressed package

Screen_Shot_2020-12-23_at_5.08.01_PM.png

Download and install SQL Manager Lite for InterBase and Firebird (freeware version)

Screen_Shot_2020-12-23_at_5.06.36_PM.png

Enable SSH access in Kerio Control Webadmin > Status > System Health

Solution

SSH tunnel

Firebird accepts a connection on localhost only, SSH tunnel is required.

    1. Connect to the server using command line ssh (change 10.10.10.1 to the IP address of the Kerio server):
      ssh -f -N -L 3050:localhost:3050 root@10.10.10.1

      Screen_Shot_2020-12-23_at_5.21.12_PM.png
    2. (Alternative) Connect to the server using Putty, in Connection → SSH → Tunnels, and add new forwarded port:

      Source port 3050
      Destination localhost:3050
      Click Add.

SQL Manager config

  1. Launch SQL Manager.
  2. Right-click in the left pane (Databases) → Register Host… and fill in the form:

    Host name localhost
    Protocol TCP/IP
    Password masterkey
    Client library Path to the fbclient.dll for Firebird 2.0

    Screen_Shot_2020-12-23_at_5.14.42_PM.png
  3. Do not change anything else, Next, Finish.
  4. Right-click on the newly created item in the left pane → Register Database..., select the host, Next, Next, fill in the form:

    Database name /var/winroute/star/data/star.fdb
    Charset UNICODE_FSS (clicking “Get default” should do it for you)

    Screen_Shot_2020-12-23_at_5.16.53_PM.png
  5. Click Finish.
  6. Now you should be able to view the configured STaR database.
    Screen_Shot_2020-12-23_at_5.17.27_PM.png

 


Viewing data

For example, you need to review the data In-Out for the day, hour, month, or week per user basis.

Open DATAINOUT_D (or DATAINOUT_H and so on) and USER_LIST tables.

database1.png

USER_ID is a db relationship connection in both tables.

database2.png

Important: you need to switch to the Data tab in order to view the stats.
Screen_Shot_2020-12-23_at_5.26.15_PM.png

 


Exporting data

To export content from the tables into a CSV format, the only tool available is the EMS Data Export for Interbase/Firebird. However, this one is a paid app in order to export all of the data without limitation. The unregistered version is only limited to 20% of rows.

database_export.png

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments