Main configuration file /etc/sysconfig/lvestats2 contains the following options:
db_type - selects appropriate database type to use;
connect-string - connection string for PostGreSQL and MySQL database, has the following form:
connect_string = USER:[email protected][:PORT]/DATABASE
Default port is used for specific database, if port is not specified (typical port is 3306 for MySQL and 5432 for PostGreSQL). Connection string is not used for sqlite database.
server_id - sets the name of the server (at most 10 characters). This option is to use with centralized database (PostGreSQL or MySQL). For use with sqlite database, value of this option should be "localhost" (without quotes).
plugins – path to directory containing custom plugins for lve-stats (default path /usr/share/lve-stats/plugins).
db_timeout - period of time to write data to database (in seconds); default value is 60 seconds.
timeout - timeout for custom plugins (seconds). If plugin execution does not finish within this period, plugin is terminated. Default value is 5 seconds.
interval - duration of one cycle of lvestats-server (seconds). This should be less than total duration of execution of all plugins. Default value is 5 seconds. Increasing this parameter makes precision of statistics worse.
keep_history_days - period of time (in days) to keep history in database. Old data is removed from database automatically. Default value is 60 days.
mode – sets compatibility output mode (compatibility with older lveinfo version). Value “v1” (without quotes) enables compatibility with old version of lveinfo. “v2” value enables “extended” output mode, but can break LVE plugins for control panels (statistics in LVE Manager, Resource Usage, etc). Support of v2 mode will be added to LVE plugins in the recent future. When mode parameter is absent, later version of lveinfo is implied.
disable_snapshots - disable snapshots and incidents. Possible values: true, false.
Configuration files for plugins are located in /etc/sysconfig/lvestats.config directory.
/etc/sysconfig/lvestats.config/SnapshotSaver.cfg contains the following options:
period_between_incidents - Minimal interval of time between incidents (in seconds). If minimal interval of time between LVE faults is greater than value specified, than new "incident" will begin and new snapshots will be saved. Default value is 300 seconds.
snapshots_per_minute - Maximum number of snapshots saved per minute for specific LVE id (default is 2).
max_snapshots_per_incident - Maximum number of snapshots saved for one "incident". Default is 10.
/etc/sysconfig/lvestats.config/StatsNotifier.cfg contains the following options:
NOTIFY_ADMIN – enables notification for admin (Y/N, default N);
NOTIFY_RESELLER – enables notification for reseller (Y/N, default N);
NOTIFY_CUSTOMER - enables notification for customers (Y/N, default N);
NOTIFY_INCLUDE_RESELLER_CUSTOMER – Y=notify all users, N=notify only hoster's users (whos reseller is root), default = N;
NOTIFY_CPU – notify about CPU faults when customer hits 100% of his CPU limit (Y/N, default N);
NOTIFY_IO - notify about IO faults when customer hits 100% of his IO limit (Y/N, default N);
NOTIFY_IOPS - notify about IOPS faults when customer hits 100% of his IOPS limit (Y/N, default N);
NOTIFY_MEMORY - notify about memory faults (Y/N, default N);
NOTIFY_EP – notify about entry processes faults (Y/N, default N);
NOTIFY_NPROC – notify about number of processes faults (Y/N, default N);
NOTIFY_MIN_FAULTS_ADMIN – minimum number of faults to notify admin (default 1);
NOTIFY_MIN_FAULTS_USER – minimum number of faults to notify customer (default 1);
NOTIFY_INTERVAL_ADMIN – period of time to notify admin (default 12h);
NOTIFY_INTERVAL_USER – period of time to notify customer (default 12h);
NOTIFY_FROM_EMAIL - sender email address. For example: [email protected]
NOTIFY_FROM_SUBJECT - email message subject. For example: NOTIFY_FROM_SUBJECT=Message from notifier
Templates of notifications are located here:
Note: Notifications about LVE faults are implemented for CPanel only.
Note: After changing any options above please restart lvestats service:
/etc/logrotate.d/lvestats - configuration file for /var/log/lve-stats.log rotation