- Solution Overview
- Security Layers
- Services Architecture
- Integrating with Other Solutions
- Clustered Operations
- Administration Tools Overview
Log service overview
Axigen offers an extremely flexible logging service, allowing you to select among different logging levels (how detailed the information logged should be), logging types (internal, external and system services are available) and where to store the information logged. You can set all these options for each Axigen TCP service and for the Log Service itself. The Log Service is responsible with collecting events relevant for the you. You can log (internally, remotely or using the system log) the activity of all services available in Axigen. The Axigen Log Service can log internal data coming from other Axigen modules / services or data coming from the UDP port 2000 (default option). This data can be logged in the same location or in different locations for separate services, depending on the configuration you have applied.
For the Axigen Log service, you can also specify the following information:
- on what address the Log listener should be listening (see the "Log Listener" section for more information);
- what hosts should be rejected by the Log service (using the listener "denyRules", a priority and an enable / disable switch);
- what hosts should be accepted by the Log service (using the listener "allowRules", a priority and an enable / disable switch).
Axigen's modules should define the log type using the "logtype" parameter, which can have any single values from the following three:
- "remote" or
- "system" log.
- Use the "internal" option to send events to the Log Service running on the same Axigen server. The server should have the Log Service activated.
- Use the "remote" option to send events to a Log Service running in another Axigen server, remotely, at the address specified using the "hostname" attribute. This Axigen server must have the Log Service activated.
- Use the "system" option to send events to the syslog (for instance sysklogd) with facility "LOG_MAIL" and levels mapped as:
- 0 - no message sent
- 1 - LOG_CRIT
- 2 - LOG_ERR
- 4 - LOG_WARNING
- 8 - LOG_INFO
- 16 - LOG_DEBUG
Axigen log levels
In Axigen the events are organized in 6 categories and you can select which category of events to collect. Axigen modules must define the "loglevel" parameter. In order to specify the desired sets of events to log you have to specify the correspondent log levels or a combination of thereof. The log levels in the Axigen mail server are:
- 0: no messages are logged
- 1: log critical messages
- 2: log errors
- 4: log warnings
- 8: log informative messages
- 16: log protocol communication
and the corresponding one-time combinations. Therefore the accepted values for the "loglevel" parameter are from 0 to 31.
Example 1 - Combining log levels in the Axigen mail server:
Example 2 - Disabling the log service for one Axigen service:
The format used for data logging is the following:
The Axigen Log service then transforms this data in a format similar to the one described below:
Example - log service configuration using the axigen.cfg file:
Log Rules are used to define circumstances under which certain restrictions will be imposed on log files and the log level. Rules can be associated with host names, module names or both. For instance, a rule can be defined in order to specify the size, duration and number of old files kept for logs generated on a certain host, for a certain module (e.g. SMTP In).
An ordered list is created with all log rules configurations using the "priority" parameters as ordering key. You can define the Log rules at the Axigen main module's level, in the corresponding sections of the configuration file. The Log Service will check if the information sent by the modules is the information that is supposed to receive, according to the Log Service configuration.
A log rule set includes the following information:
- the rule's priority ("1" means the rule has the highest priority possible);
- the hostname of the user of this rule;
- the module of the user of this rule;
- the level of log generated by the user of this log;
- the name of the destination file;
- the maximum size of the destination file in KB;
- the maximum duration the destination file is used in seconds;
- the maximum number of old files (saved) to be kept;
- the rotate period (how often a new log file is created - daily, monthly, yearly).
Attributes of the Log service
The Axigen Log service can log internal data coming from other modules / services or data coming from the UDP port 2000 (default value). This data can be logged in the same location or in different locations for separate services, depending on the configuration applied by you. Axigen's main modules must define the log type to be used by that specific module. The definition is executed via the "logtype" parameter that can have any of the following three values: "internal", "remote" or "system" log.
The value for the "loglevel" parameter from the log clients (the services sending information for logging to Axigen Log service) specifies the log levels sent to the Log service.
The value for the "loglevel" parameter from the log service's rule specifies the log levels accepted by the service from clients.
- clientlevel = 15 (the log level specified in the SMTP-In service page in WebAdmin for instance)
- rulelevel = 9 (the log level specified in the rule defined for the SMTP-In module)
the Log service will only log the lines on level 9 (critical information), even if the information retrieved from client also contains errors and warnings (this information is ignored).