Configuring Reporting for Syslog
Syslog is a network-logging utility that issues, stores, and processes meaningful log messages. It is designed so DBAs can keep machines up and running, and it is a useful way to get heterogeneous data into a single data repository.
To log events to syslog, enable event reporting for each individual event you want logged. Messages are logged, by default, in /var/log/messages
.
Configuring event reporting to syslog consists of:
- Enabling Vertica to trap events for syslog.
-
Defining which events Vertica traps for syslog.
Vertica strongly suggests that you trap the Stale Checkpoint event.
- Defining which syslog facility to use.
Enabling Vertica to Trap Events for Syslog
To enable event trapping for syslog, issue the following SQL command:
=> ALTER DATABASE mydb SET SyslogEnabled = 1;
To disable event trapping for syslog, issue the following SQL command:
=> ALTER DATABASE mydb SET SyslogEnabled = 0;
Defining Events to Trap for Syslog
To define events that generate a syslog entry, issue the following SQL command, where Event_Name
is one of the events described in the list below the command:
=> ALTER DATABASE mydb SET SyslogEvents = 'Event_Name, Event_Name';
- Low Disk Space
- Read Only File System
- Loss Of K Safety
- Current Fault Tolerance at Critical Level
- Too Many ROS Containers
- WOS Over Flow
- Node State Change
- Recovery Failure
- Recovery Error
- Recovery Lock Error
- Recovery Projection Retrieval Error
- Refresh Error
- Refresh Lock Error
- Tuple Mover Error
- Timer Service Task Error
- Stale Checkpoint
The following example generates a syslog entry for low disk space and recovery failure:
=> ALTER DATABASE mydb SET SyslogEvents = 'Low Disk Space, Recovery Failure';
Defining the SyslogFacility to Use for Reporting
The syslog mechanism allows for several different general classifications of logging messages, called facilities. Typically, all authentication-related messages are logged with the auth
(or authpriv
) facility. These messages are intended to be secure and hidden from unauthorized eyes. Normal operational messages are logged with the daemon
facility, which is the collector that receives and optionally stores messages.
The SyslogFacility directive allows all logging messages to be directed to a different facility than the default. When the directive is used, all logging is done using the specified facility, both authentication (secure) and otherwise.
To define which SyslogFacility Vertica uses, issue the following SQL command:
=> ALTER DATABASE mydb SET SyslogFacility = 'Facility_Name';
Where the facility-level argument <Facility_Name>
is one of the following:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|