Usm stat EN: различия между версиями

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
 
Строка 1: Строка 1:
[[Usm_stat_EN|en]] | [[Usm_stat|ru]]
[[Usm_stat_EN|en]] | [[Usm_stat|ru]]


'''USM_STAT''' - to record the history of [[User activity| user activity]] on the network/internet
'''USM_STAT''' - to record the history of [[Activity| user activity]] on the network/internet


'''This module is a replacement for the obsolete [[us_stat_EN|us_stat]] module'''
'''This module is a replacement for the obsolete [[us_stat_EN|us_stat]] module'''

Текущая версия от 13:47, 2 ноября 2023

en | ru

USM_STAT - to record the history of user activity on the network/internet

This module is a replacement for the obsolete us_stat module


Module Language: Perl

Current version: see page: Modules

Module Status: Paid

Required Perl modules:

Time::Local
FindBin
URI
URI::Escape
LWP::UserAgent
JSON
Data::Dumper

For general information for all modules, see the page: Modules

The module checks user activity records once an hour during its operation. If a user was active during the last hour, this fact is recorded in the database. In this way the history of users' activity in terms of time interval is accumulated. The results are visible in the user card - "Activity" tab.

Installing and configuring the module

  1. Allocate a separate catalogue. A completely arbitrary one. It is better not to place it in a catalogue accessible via web. Interaction with ERP "UserSide" is carried out by means of API via http/s-protocol. In this way the module is fully autonomous and can work on any separate computer in any subnet. Also create a separate directory for the module logs. Do not forget to specify write permissions for it.
  2. Transfer there the files from the module archive. Rename the sample configuration file "usm_stat.conf-example" to "usm_stat.conf". In it, configure the parameters. The list of possible parameters is given below.
  3. Check for additional perl packages that are required to run the module. Their list is given above. If you do not have them installed, the module will generate an error at startup and the perl-package will need to be installed (using CPAN or PPM)'.
  4. In the "Settings - Modules" section, switch on the usm_stat module
  5. Run the module manually
perl usm_stat.pl

It should start and run without errors.

7. Write the module startup into the system cron, according to the recommendations below

*/25 * * * * perl /home/usm_stat/usm_stat.pl &> /dev/null

Parameters

The module is configured in the usm_stat.conf file

$usUrl - URL to ERP "UserSide"
$usApiKey - API-key to ERP "UserSide"
$logsPath - Path to the directory for module logs

$isSilence - Flag - hide notifications to the console when the module is running