Log Storage (logstore)

Description

Provides long-term storage of log files from all servers and nodes. Exists within each site independently of others.

Is the data provider for the log file access API. Uses disk storage; the maximum size of stored data is configured in the options, after which data is automatically cleaned up.

Made redundant in Active-Passive mode. Not scaled.

Table 1. System characteristics

Code

logstore

Operation mode

Service

Redundancy mode

Active-Passive

Site types

Any

Layer

Service

Placement

Internal

State preservation and recovery on restart

Yes

Application

era_logstore

Own storage

File system

Limitations

  • If the role is absent, guaranteed log storage is not provided, except that logs remain available for some time directly on the servers where they were created by the roles.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and digits and must start with a letter.

roletype

str

required

Role type. Possible values: "logstore".

ext

json

empty

Additional role options. Contains a JSON object or list.

enabled

bool

empty

Role activity flag. When set to false, the role does not participate in validation and is not started.

limit_of_cores

int

empty

Limit on the number of CPU logical cores used. Default: 0 - unlimited.

logging_default_level

int

empty

Default logging level set specifically for the role instance (microservice type). More

allow_divergence

bool

false

Flag allowing parameter differences in roles of the same group. Default: false - not allowed.

group

int

required

Group number.
Horizontal scaling within a site is not supported. All role instances on the site must have the same value.
An integer from 1 to 9999999.

order

int

required

Order of the role instance within the group.
Determines the order in which takeover occurs in Active-Passive mode.

storepath

str

empty

Alias of the server directory for placing and storing log files.
Default: "/var/lib/era/_workdir/<NODE_NAME>/log/logstore".
The directory is expected to be network storage accessible to all role instances.

storedays

int

2

Number of days to retain log files.
When reached, outdated data is deleted automatically.

storesize

int

100

Maximum size of stored log files in GB.
When reached, the oldest data is deleted automatically.

takeover

bool

global

Takeover mode switch.

Failover - activation of a lower-priority service instance when the higher-priority service instance (leader of the active-passive group) is detected as unavailable.
Takeover - activation of the higher-priority service instance (leader of the active-passive group) during its recovery, accompanied by stopping the service on the lower-priority service instance.

  • If the mode is enabled, takeover is performed automatically.

  • If the mode is disabled, takeover is not performed; the recovered group leader temporarily becomes a follower and waits for the service to be unloaded on the lower-priority instance.

  • If the option is not set, its value from the current site parameters is used. If it is not set on the site, the value from the general section is used. If it is not set anywhere, takeover is enabled for more accurate load distribution according to the configured priorities.

Configuration example

Configuration management is performed in an application available to master domain administrators. The application hides the full configuration content, but it is still available through the API.

The configuration contains a section describing all instances of all roles. Parameters are defined for each specific role instance.

Node example
{
  "name": "logstore1",
  "roletype": "logstore",

  "group": 11110,
  "order": 1,

  "storepath": "alias://paths/c"
}

See also