If you need to uninstall syslog-ng OSE for some reason, you have the following options:
If you have installed syslog-ng OSE from a .deb package: Execute the dpkg -r syslog-ng command to remove syslog-ng, or the dpkg -P syslog-ng command to remove syslog-ng OSE and the configuration files as well. Note that removing syslog-ng OSE does not restore the syslog daemon used before syslog-ng.
If you have installed syslog-ng OSE from an .rpm package: Execute the rpm -e syslog-ng command to remove syslog-ng OSE. Note that removing syslog-ng OSE does not restore the syslog daemon used before syslog-ng OSE.
If you have compiled syslog-ng OSE from source: Execute the sudo make uninstall command to remove syslog-ng OSE. Note that removing syslog-ng OSE does not restore the syslog daemon used before syslog-ng OSE.
Complete the following steps to configure your Microsoft SQL Server to enable remote logins and accept log messages from syslog-ng.
Start the SQL Server Management Studio application. Select Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio.
Create a new database.
Figure 5: Creating a new MSSQL database 1.
In the Object Explorer, right-click on the Databases entry and select New Database.
Figure 6: Creating a new MSSQL database 2.
Enter the name of the new database (for example syslogng) into the Database name field and click OK.
Create a new database user and associate it with the new database.
Figure 7: Creating a new MSSQL user 1.
In the Object Explorer, select Security, right-click on the Logins entry, then select New Login.
Figure 8: Creating a new MSSQL user 2.
Enter a name (for example syslog-ng) for the user into the Login name field.
Select the SQL Server Authentication option and enter a password for the user.
In the Default database field, select the database created in Step 2 (for example syslogng).
In the Default language field, select the language of log messages that you want to store in the database, then click OK.
|
Caution:
Incorrect language settings may result in the database converting the messages to a different character-encoding format. That way the log messages may become unreadable, causing information loss. |
In the Object Explorer, select Security > Logins, then right-click on the new login created in the previous step, and select Properties.
Figure 9: Associating database with the new user
Select User Mapping. In the Users mapped to this login option, check the line corresponding to the new login (for example syslogng). In the Database role membership field, check the db_owner and public options.
Figure 10: Associating database with the new user
Enable remote logins for SQL users.
In the Object Explorer right-click on your database server, and select Properties > Security, and set the Server Authentication option to SQL Server and Windows Authentication mode.
This chapter provides a very brief introduction into configuring the syslog-ng OSE application. For details on the format of the configuration file and how to configure sources, destinations, and other features, refer to the subsequent chapters.
To configure syslog-ng OSE as a client that sends log messages to a central logserver, see Configuring syslog-ng on client hosts.
To configure syslog-ng OSE as a server that receives log messages from client hosts, see Configuring syslog-ng on server hosts.
To configure syslog-ng OSE as a relay that receives log messages from client hosts and forwards them to a central logserver, see Configuring syslog-ng on server hosts.
To configure syslog-ng on a client host, complete the following steps.
Install the syslog-ng application on the host. For details installing syslog-ng on specific operating systems, see Installing syslog-ng.
Configure the local sources to collect the log messages of the host. Starting with version 3.2, syslog-ng OSE automatically collects the log messages that use the native system logging method of the platform, for example, messages from /dev/log on Linux, or /dev/klog on FreeBSD. For a complete list of messages that are collected automatically, see system: Collecting the system-specific log messages of a platform.
To configure syslog-ng OSE, edit the syslog-ng.conf file with any regular text editor application.
Add sources to collect the messages from your log files. File sources look like this:
source s_myfilesource { file("/var/log/myapplication.log" follow-freq(1)); };
Name every source uniquely. For details on configuring file sources, see file: Collecting messages from text files.
|
TIP:
Many applications send log messages to logfiles by default (for example, the Roundcube webmail client, or the ProFTPD FTP server), but can be configured to send them to syslog instead. If possible, it is recommended to reconfigure the application that way. |
|
NOTE:
The default configuration file of syslog-ng OSE collects platform-specific log messages and the internal log messages of syslog-ng OSE. source s_local { system(); internal(); }; |
Create a network destination that points directly to the syslog-ng server, or to a local relay. The network destination greatly depends on the protocol that your log server or relay accepts messages. Many systems still use the legacy BSD-syslog protocol (RFC3162) over the unreliable UDP transport:
destination d_network { network("10.1.2.3" transport("udp")); };
However, if possible, use the much more reliable IETF-syslog protocol over TCP transport:
destination d_network { syslog("10.1.2.3" transport("tcp")); };
Create a log statement connecting the local sources to the syslog-ng server or relay. For example:
log { source(s_local); destination(d_network); };
If the logs will also be stored locally on the host, create local file destinations.
|
NOTE:
The default configuration of syslog-ng OSE places the collected messages into the /var/log/messages file: destination d_local { file("/var/log/messages"); }; |
Create a log statement connecting the local sources to the file destination.
|
NOTE:
The default configuration of syslog-ng OSE has only one log statement: log { source(s_local); destination(d_local); }; |
Set filters, macros and other features and options (for example TLS encryption) as necessary.
The following is the default configuration file of syslog-ng OSE 3.18. It collects local log messages and the log messages of syslog-ng OSE and saves them in the /var/log/messages file.
@version: 3.18 @include "scl.conf" source s_local { system(); internal(); }; destination d_local { file("/var/log/messages"); }; log { source(s_local); destination(d_local); };
The following is a simple configuration file that collects local log messages and forwards them to a logserver using the IETF-syslog protocol.
@version: 3.18 @include "scl.conf" source s_local { system(); internal(); }; destination d_syslog_tcp { syslog("192.168.1.1" transport("tcp") port(2010)); }; log { source(s_local);destination(d_syslog_tcp); };
© 2024 One Identity LLC. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center