]> git.stg.codes - stg.git/blobdiff - projects/stargazer/inst/linux/etc/stargazer/stargazer.conf
Move projects back into subfolder.
[stg.git] / projects / stargazer / inst / linux / etc / stargazer / stargazer.conf
index f3e1199176fa0484d257c87bb2841cc5775ee3a3..bb8ee7c47e4ec7f3ada0ec6fee5f9dff8a6db6e4 100644 (file)
 ################################################################################
-#                        Файл настроек сервера stargazer                       #
+#                        Stargazer Configuration file                          #
 ################################################################################
 
-
-
-# Имя лог-файла куда пишутся события
+# LOG file name
+# Parameter: required
+# Value: file path
+# Default: /var/log/stargazer.log
 LogFile = /var/log/stargazer.log
 
-
-
-# Имя PID-файла куда пишется идентификатор процесса
-# По умолчанию /var/run/pid
+# PID file name
+# Parameter: optional
+# Value: file path
+# Default: /var/run/stargazer.pid
 PIDFile = /var/run/stargazer.pid
 
-
-
-# Имя файла в котором определяются правила подсчета трафика
+# Traffic classification rules
+# Parameter: required
+# Value: file path
+# Default: /etc/stargazer/rules
 Rules = /etc/stargazer/rules
 
-
-
-# Время через которое пишется d БД детальная статистика пользователя
-# Значения: 1, 1/2, 1/4, 1/6.
-# 1 - раз в чаc, 1/2 - раз в пол часа, 1/4 - раз в 15 мин, 1/6 - раз в 10 мин
-DetailStatWritePeriod=1/6
-
-
-
-# Периодичность записи записи в БД информации о статистике пользователя (минуты)
-# При большом кол-ве пользователей эту величину стоит увеличить, т.к.
-# запись в БД может занимать длительное время.
-# Значения: 1...1440 (минуты)
+# The time interval between writing detailed user's statistics into the database
+# Note: With a large number of users this value should be increased,
+# since writting into the database can take a long time.
+# Parameter: required
+# Values: 1 (hourly), 1/2 (every half hour), 1/4 (every 15 m), 1/6 (every 10 m)
+# Default: 1/2
+DetailStatWritePeriod = 1/2
+
+# The time interval between writing summary user's statistics into the database
+# Parameter: optional
+# Value: 1 ... 1440 (minutes)
+# Default: 10
 StatWritePeriod = 10
 
-
-
-# День снятия абонплаты
-# Значения: 0...31. 0 - Последний день месяца
+# Day of charging fee
+# Note: 0 - The last day of the month
+# Parameter: required
+# Value: 0 ... 31
+# Default: 1
 DayFee = 1
 
-
-
-# Абонплата снимается в последний (yes) или первый (no) день учетного периода.
-# Это влияет на то, как будет снята абонплата (АП) при переходе на новый тариф.
-# Если у пользователя был тариф A с АП=100 и он хочет перейти на тариф B с АП=200,
-# то при переходе на новый тариф со счета пользователя снимется 100, если
-# DayFeeIsLastDay = yes и 200, если DayFeeIsLastDay = no
-DayFeeIsLastDay = yes
-
-
-
-# День сброса данных о трафике за месяц и день перехода пользователей на новые тарифы
-# Значения: 0...31. 0 - Последний день месяца
+# When set to 'no' Stargazer will continue reading database after error and show all of them.
+# Parameter: optional
+# Values: yes, no
+# Default: yes
+# StopOnError = yes
+
+# Fee charged at the last (yes) or first (no) day of tariffication period.
+# Defines how the fee will be charged in the transition to the new tariff.
+# User has tariff A with fee 100. Changing it to tariff B with fee 200
+# will result in charging user's account at 100 if DayFeeIsLastDay = yes 
+# and at 200, if DayFeeIsLastDay = no
+# Parameter: required
+# Values: yes, no
+# Default: no
+DayFeeIsLastDay = no
+
+# Day of changing delayed tariffs and resetting summary user's statistics.
+# Defines the edge of the tariffication period.
+# Parameter: required
+# Value: 0 ... 31. 0 - The last day of the month
+# Default: 1
 DayResetTraff = 1
 
-
-
-# "Размазанное" снятие абонплаты. Снятие АП не раз в месяц, а каждый
-# день 1/30 или 1/31 части АП
-# Значения: yes, no
+# Defines whether to charge fee daily (yes) or monthly (no)
+# Parameter: required
+# Values: yes, no
+# Default: no
 SpreadFee = no
 
-
-
-# Данная опция определяет может ли пользователь получить доступ в интерент
-# если у него на счету нет денег, но остался предоплаченный трафик
-# Значения: yes, no
+# Defines whether the user can access the internet if it has no cash,
+# but remained prepaid traffic
+# Parameter: required
+# Values: yes, no
+# Default: no
 FreeMbAllowInet = no
 
-
-
-# Эта опция определяет что будет писаться в стоимость трафика в detail_stat.
-# Если у пользователя еще есть предоплаченный трафик и WriteFreeMbTraffCost = no,
-# то в detail_stat стоимость будет 0. Если у пользователя уже нет
-# предоплаченного трафика и WriteFreeMbTraffCost = no, то в detail_stat
-# будет записана стоиость трафика. При WriteFreeMbTraffCost = yes стоимость
-# трафика будет записана в любом случае.
-WriteFreeMbTraffCost = no
-
-
-
-# Необязательный параметр. Указывает снимать полную абонплату у пользователя даже
-# если он быз заморожен только часть учетного периода.
-# По умолчанию установлен в no
-# FullFee=no
-
-# Необязательный параметр указывающий показывать на счету и позволять 
-# использовать пользователю абонплату. По умолчанию установлен в yes
+# Defines what will be written in the traffic cost in detail_stat.
+# If user still has the prepaid traffic and WriteFreeMbTraffCost = no,
+# then the traffic cost willn't be written in detail_stat.
+# If user doestn't have prepaid traffic and WriteFreeMbTraffCost = no, 
+# then the traffic cost will be written in detail_stat.
+# When WriteFreeMbTraffCost = yes the traffic cost will be recorded in any case.
+# Parameter: required
+# Values: yes, no
+# Default: yes
+WriteFreeMbTraffCost = yes
+
+# Charge a full monthly fee even if user was "frozen" a part 
+# of the tariffication period
+# Parameter: optional
+# Values: yes, no
+# Default: no
+FullFee = no
+
+# Allow user to see and use a full cash (yes) or hide a part of it (no) 
+# for the next fee charge
+# Parameter: optional
+# Values: yes, no
+# Default: yes
 # ShowFeeInCash=yes
 
-
-
-# Названия направлений. Направления без названий не будут отображаться в
-# авторизаторе и конфигураторе. Названия состоящие из нескольких слов должны
-# быть взяты в кавычки
+# The names of directions. Direction without names will not appear in
+# authorizer and configurator.
+# Note: Names consisting of several words should be quoted
+# Parameter: optional
+# Values:
 <DirNames>
-    DirName0 = ìÏËÁÌØ
-    DirName1 = çÏÒÏÄ
-    DirName2 = íÉÒ
+    DirName0 = Internet
+    DirName1 =
+    DirName2 =
     DirName3 =
     DirName4 =
-    DirName5 = "ìÏËÁÌØÎÙÅ ÉÇÒÙ"
+    DirName5 =
     DirName6 =
     DirName7 =
     DirName8 =
     DirName9 =
 </DirNames>
 
-
-
-# Кол-во запускаемых процессов stg-exec.
-# Эти процессы отвечают за выполнение скриптов OnConnect, OnDisconnect, ...
-# Кол-во процессов означает сколько скриптов могут выполнятся одновременно.
-# Значения: 1...1024
+# Amount of stg-exec processes.
+# These processes are responsible for the execution of scripts OnConnect, 
+# OnDisconnect, etc. 
+# Amount of processes means how many scripts can be executed simultaneously.
+# Recommend to leave 1 to avoid errors when executing scripts
+# Parameter: optional
+# Value: 1 ... 1024
+# Default: 1
 ExecutersNum = 1
 
-
-
-# Message Key для stg-exec.
-# Идентификатор очереди сообщений для выполнятеля скриптов.
-# Его изменение может понадобится если есть необходимость запустить несколько
-# экземпляров stg. Если вы не понимаете, что это, не трогайте этот параметр!
-# Значения: 0...2^32
-# Значение по умолчанию: 5555
+# Message queue identifier for the script executer.
+# It may be changed if there're a needs to run multiple copies of stargazer.
+# Warning: If you do not understand it, do not touch this setting!
+# Parameter: optional
+# Value: 0 ... 2 ^ 32
+# Default: 5555
 # ExecMsgKey = 5555
 
-
-
-# Путь к директории, в которой находятся модули сервера
+# The path to directory with server modules
+# Parameter: required
+# Value: directory path
+# Default: /usr/lib/stg
 ModulesPath = /usr/lib/stg
 
-# Определяет директорию, в которой будут находится файлы "монитора"
-# работы сервера. В этой директории будут созданы пустые файлы, время 
-# модификации которых будет меняться примерно раз в минуту. Если какой-то 
-# компонент сервера зависнет, файл(ы) перестанет обновлятся, и по этому 
-# признаку можно определить сбой в работе сервера и при надобности 
-# перезапустить. Если параметр не указан или пустой, мониторинг производится 
-# не будет. Параметр не является обязательным, по умолчанию пустой.
+# Directory where the "monitor" files are located.
+# A blank files will be created in this directory. The modification time of such
+# files will be changed about once a minute. If server crashes or some of server 
+# component hang, the files will stop refreshing, and on this basis we can define
+# the failure of the server and if necessary restart. 
+# If option is omitted or blank, the monitoring is not performed.
+# Parameter: optional
+# Value: file path
+# Default: /var/stargazer/monitor
 #MonitorDir=/var/stargazer/monitor
 
+# Defines message maximum lifetime
+# Note: 0 - unlimited
+# Parameter: optional
+# Value: any numeric
+# Default: 0 (day)
+# MessagesTimeout = 0
+
+# Defines fee charging rules.
+# 0 - classic rules, allow fee charge even cash is negative;
+# 1 - disallow fee charge if cash value is negative;
+# 2 - disallow fee charge if there is not enought cash (cash < fee).
+# Parameter: optional
+# Value: 0 ... 2
+# Default: 0 (classic)
+# FeeChargeType = 0
+
+# Enable or disable reconnect on tariff change
+# Parameter: optional
+# Values: yes, no
+# Default: no
+# ReconnectOnTariffChange = no
+
+# Definest set of parameters passed to OnConnect and OnDisconnect scripts
+# This set is added to the end of the default param list, which are, respectively:
+# login, ip, cash, id, dirs
+# Valid parameter names: "cash", "upload", "download", "lastCashAdd", "passiveTime",
+# "lastCashAddTime", "freeMb", "lastActivityTime", "password", "passive", "disabled",
+# "disabledDetailStat", "alwaysOnline", "tariffName", "nextTariff", "address",
+# "note", "group", "email", "phone", "realName", "credit", "creditExpire", "ips",
+# "userdata0" ... "userdata9".
+# Parameter: optional
+# Values: parameter names, case insensitive
+# Default:
+# ScriptParams =
+
+# Enable or disable writing session log
+# Parameter: optional
+# Values: yes, no
+# Default: no (session log is enabled)
+# DisableSessionLog = no
+
+# Filter for logging parameter changes
+# Defines which parameters will be logged to parameter log in database. Allows
+# to specify multiuple parameter names or asterisk (*), which means "log all params".
+# Valid parameter names: "cash", "upload", "download", "lastCashAdd", "passiveTime",
+# "lastCashAddTime", "freeMb", "lastActivityTime", "password", "passive", "disabled",
+# "disabledDetailStat", "alwaysOnline", "tariffName", "nextTariff", "address",
+# "note", "group", "email", "phone", "realName", "credit", "creditExpire", "ips",
+# "userdata0" ... "userdata9".
+# Parameter: optional
+# Values: parameter names, case insensitive, or "*"
+# Default: *
+# FilterParamsLog = *
+
 ################################################################################
 # Store module
-# Настройки плагина работающего с БД сервера
-
-# Параметр - это имя модуля без mod_ в начале и .so в конце
-# Т.е. полное имя модуля mod_store_files.so
-<StoreModule store_files>
-
-    # Рабочая директория сервера, тут содержатся данные о тарифах, пользователях,
-    # администраторах и т.д.
-    WorkDir = /var/stargazer
-
-
-    # Владелец, группа и права доступа на файлы статистики (stat) пользователя
-    ConfOwner = root
-    ConfGroup = wheel
-    ConfMode = 600
-
-
-    # Владелец, группа и права доступа на файлы конфигурации (conf) пользователя
-    StatOwner = root
-    StatGroup = wheel
-    StatMode = 640
-
-    # Владелец, группа и права доступа на лог-файлы (log) пользователя
-    UserLogOwner = root
-    UserLogGroup = wheel
-    UserLogMode = 640
-
-    # Удалять резервные копии после успешной записи conf/stat
-    # Значения: yes, no
-    # По умолчанию: yes
-    # RemoveBak = yes
-
-    # Восстанавливать файлы conf/stat из резервных копий при ошибке чтения
-    # Значения: yes, no
-    # По умолчанию: no
-    # ReadBak = no
-
-</StoreModule>
-
-#<StoreModule store_firebird>
-#    # Адрес сервера БД
-#    server=localhost
-#
-#    # Путь к БД на сервере или ее алиас
-#    database=/var/stg/stargazer.fdb
-#
-#    # Имя пользователя БД
-#    user=stg
-#
-#    # Пароль пользователя БД
-#    password=123456
-#
-#    # Уровень изоляции транзаций (не обязательно, по умолчанию oncurrency):
-#    #  concurrency
-#    #  dirtyRead
-#    #  readCommitted
-#    #  consistency
-#    isolationLevel=concurrency
-#
-#    # Действия при блокировках (не обязательно, по умолчанию wait):
-#    #  wait
-#    #  noWait
-#    lockResolution=wait
-#</StoreModule>
-
-#<StoreModule store_postgresql>
-#    # Адрес сервера БД
-#    server=localhost
-#
-#    # Имя БД
-#    database=stargazer
-#
-#    # Имя пользователя БД
-#    user=stg
-#
-#    # Пароль пользователя БД
-#    password=123456
-#</StoreModule>
-
-#<StoreModule store_mysql>
-#    # Имя пользователя БД
-#    dbuser = stg
-#
-#    # Пароль пользователя БД
-#    rootdbpass = 123456
-#
-#    # Имя БД на сервере
-#    dbname = stg
-#
-#    # Адрес сервера БД
-#    dbhost = localhost
-#</StoreModule>
+# Configure the module that works with the database server
 
-################################################################################
-# Прочие модули
+# Warning: Only one store module could be used at the same time!
 
-<Modules>
-    # Модуль захвата трафика "mod_cap_nf.so"
-    # Принимает информацию о трафике по протоколу NetFlow
-    <Module cap_nf>
-        # TCPPort - порт для TCP-соединений
-        #TCPPort = 42111
+<IncludeFile "conf-enabled.d/store_*.conf">
+</IncludeFile>
 
-        # UDPPort - порт для UDP-соединений
-        UDPPort = 42111
 
-        # Могут иметь совпадающие значения.
-        # Если параметр не указан - соответствующий порт не "прослушивается".
-    </Module>
+################################################################################
+# Other modules
+
+<Modules>
 
-    <IncludeFile "conf-enabled.d/*.conf">
+    <IncludeFile "conf-enabled.d/mod_*.conf">
     </IncludeFile>
 
 </Modules>