Create Collector

Table of Contents​

You can also follow the sequence above, in order to use the collector.

In this document, the example shows that the collector gathers syslogs of Linux system in real-time. In general, the collector and Machbase are operated on different servers, but here, the collector and Machbase are running on the same server (127.0.0.1) for convenience.

Install Collector Package

The same installation method of Machbase is used for installing the collector package. Refer to Install Collector for detailed information.

Execute Collector Manager

The collector manager controls all the collectors. In order to manage collectors, the collector manager must be executed first before using collectors. Use the commands below to run the manager.

[mach@localhost ~]$ machcollectoradmin --startup
Waiting for collector manager starts.
Collector Manager started successfully.
[mach@localhost ~]$

To check whether the manager is running, issue "netstat" command as shown below.

[mach@localhost ~]$ netstat -anp | grep "LISTEN "
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
...
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 21163/machcollecto
...
[mach@localhost ~]$

Register Collector Manager

Initially, there is no physical link between the collector manager and the server. Thus, the collector manager must be registered with the server. See below how to register the manager using machsql queries.

Syntax:

CREATE COLLECTORMANAGER manager_name AT "host_addr:host_port";

manager_name : Name that separates collectors in the Machbase server. The same name cannot be created.
host_addr : Address of a host where a collector manager installed.
host_manager : Port number where a collector manager is waiting for communication.

You can add a collector manager with the commands above in a localhost.

[mach@localhost ~/mach]$ machsql
=================================================================
Machbase Client Query Utility
Release Version 3.0.0.8634.official
Copyright 2015, Machbase Inc. or its subsidiaries.
All Rights Reserved.
=================================================================
Machbase server address (Default:127.0.0.1):
Machbase user ID (Default:SYS)
Machbase user password:
MACHBASE_CONNECT_MODE=INET, PORT=5656
mach>CREATE COLLECTORMANAGER LOCALHOST AT "127.0.0.1:9999";
Created successfully.
Elapsed Time : 0.039
mach>

Add the manager to the server through CREATE command and then, you can check it in "m$sys_collectormanagers." In "m$sys_collectormanagers" table, check the information of the newly added manager.

mach> SELECT * FROM m$sys_collectormanagers;
MANAGER_ID MANAGER_NAME MANAGER_HOST MANAGER_PORT MANAGER_STATE
------------------------------------------------------------------------------------------------------------------------------
1 LOCALHOST 127.0.0.1 9999 1
[1] row(s) selected.
Elapsed Time : 0.001

It shows the information about the manager: a number, a name, port number, an address, and values for status of the manager.

Create a Collector

After the registration, create a collector with the collector manager. This collector is stored inside the Machbase as the permanent object and contain the information that can be monitored. Use the SQL queries below to create collectors.

syntax:

CREATE COLLECTOR manager_name.collector_name FROM "path_for_template.tpl";

manager_name : Name of the collector manager that controls collectors.
collector_name : Name of a collector.
path_for_template.tpl : Many example files can be found in the "$home/machbase/machbase_home/collector" directory.

Choose a tpl example that is suitable for your environment, and save it as a separate file, then register it after modifying the contents for your requirements.

Prepare Template File

The template file is a text file that contains the information of data source, data processing, and storage methods for processed data. Samples can be found in $home/machbase/machbase_home/collector.

Structure of Template File

The structure of a template file is consisted of "variable name = value". It is the similar format of property files. The detailed information about variables can be found in the table below.
The collector for Machbase 3.5 version is not compatible with the previous versions as new collection methods are added.

Table 1. Template variable

Name of Variable Description Description
COLLECT_TYPE Data collection method It specifies a collection method. Currently four methods are available. FILE method is set as default. (FILE: It collects data from a local host. - SFTP: It collects data from a remote host. SOCKET: It collects data which are inserted via a local socket. ODBC: It collects data from a specified database.
LOG_SOURCE A name of a file where log data are stored. It describes full names of both file and directory. For SFTP method, it enters the absolute path for log files located in a remote host. It is not used for SOCKET and ODBC methods. Multiple paths are added after version 3.5. Regular Expression is supported after version 3.5.
SFTP_HOST SFTP_HOST
SFTP_PORT SFTP_PORT If not specified, port 22 is used as default.
SFTP_USER User ID for a remote host If not specified, log in anonymously.
SFTP_PASS User PWD for a remote host If not specified, log in anonymously.
SOCKET_PORT Port number for a local host It specifies a port for the collector to receive data.
SOCKET_PROTOCOL Protocol for a collector It specifies a protocol for communication. The default is set to TCP. Configuration values: TCP and UDP
ODBC_DSN Configuration the DSN for ODBC In general, ".odbc.ini" takes priority.
ODBC_QUERY Query to retrieve data from a specified database It writes SELECT statement for the specified database. Do not write anything other than target table and columns.
ODBC_SEQ_COLUMN Column name for a baseline value of data which were retrieved by using queries. It specifies a baseline column. (Only numeric values can be used.)
LIB_NAME Extended dynamic library Not available yet
REGEX_PATH Path of regular expression file to analyze collected data It specifies a path of rgx file that contains information of regular expressions. *It cannot be used for ODBC method.
PREPROCESS_PATH A path of Python scripts to execute When only files are inserted, the scripts can be found in $home/machbase/machbase_home/collector/preprocess.
SLEEP_TIME It is the waiting time for data to be inserted after completing data retrieval. It inserts data in millisecond unit. 1000(1 sec.) is set as default.
DB_TABLE_NAME Name of a table that log data are inserted
DB_ADDR Address value of a database where log data are stored
DB_PORT Port value of a database where log data are stored
DB_USER User name of a database where log data are stored
DB_PASS Password of a database where log data are stored
APPEND_MODE Method of storing data to a database where log data are stored. It always use APPEND mode. For 3.0.0 or above versions, APPEND_MODE is used for compatibility with older versions.
AUTO_ADD_COLUMN It determines whether to create a column automatically or not in the existing table schema and execute it. _0: Not create a column. _1: Automatically create a column. If not specified, 1 will be used as default.It is supported for 3.0.2 version or later.
CREATE_TABLE_MODE It determines a method to create a specified table as DB_TABLE_NAME. (0: Do nothing / 1: TRUNCATE a table / 2: CREATE a table. When an error occurs, issues a warning and proceed the next action. / 3: DROP a table and CREATE a table again. Generally it is recommended to use the number 2 method.
LANG Encode a raw data file. UTF-8 is set as default value. For Machbase 3.5, currently available codes are as follows:UTF-8 (UTF8): It is the default code. No need to specify it./ CP949(MS949): The code page supports Korean language./ KSC5601: It is the standard code of Korean language./ EUCJP: It supports Japanese language./ SHIFTJIS: Code for SHIFTJIS / BIG5: Code for Chinese language / BG231280: Code for Chinese language
REGEX_SORT Set the name order of the files to be collected. The default is ASC, which collects files in ascending order. If set to DESC, collect in descending order. It is supported from version 3.5.
ROTATE_FILE_PATH Specify the rotation file path. Sets the regular expression path of the rotate file. It is supported from version 3.5.
ROTATE_FILE_COUNT Specify the number of rotate files to acquire. Sets how many of the rotation files that match the regular expression are collected. It is supported from version 3.5.
ROTATE_REGEX_SORT Specify the name order of the rotate files to be collected. The default is ASC, which collects files in ascending order. If set to DESC, collect in descending order. It is supported from version 3.5.

REGEX_PATH and PREPROCESS_PATH are configuration and script files respectively that the collector tries to gain access. Below is a description about options of rgx file that inserted in REGEX_PATH.

Table 2. Variable of regex

Name of variable Description Detailed information
LOG_TYPE Name of log type of regular expression It can be modified, but this value will be inserted into the database so that the same value should be kept.
COL_LIST Rules of mapping analyzed data to tables of database. Described it in the table below.
REGEX Regular expression for data analysis
START_REGEX Regular expression to show a starting point of a data It is included during the process of REGEX analysis.
END_REGEX Regular expression to show a ending point of a data It is excluded during the process of REGEX analysis. If it is not specified, the collector will not be executed.

COL_LIST describes the rules of mapping table columns to log files. It uses multiple variables to map results of regular expression into columns of database. The user can insert any type of log data into the structured table by utilizing COL_LIST without difficulties.

Table 3. COL_LIST

Name of variable Description Detailed information
NAME Column name of table It needs character strings without a space.
TYPE Data type of a table It represents the type of a string. Types and strings are as follows. The size is in the parentheses. (short (6), int (11), long (20), float (17), double (17), datetime (31), varchar (User-defined), ipv4 (15), ipv6 (45), text (64MB), binary (64MB))
SIZE It indicates the size of the column. The size has to be the same with the specified size listed above except varchar type.
DATE_FORMAT When TYPE is datetime, format string to express the time. e.g.) Aug 19 07:56:16 is the format of month day hour:min:sec, and it is required to define "%b %d %H:%M:%S" in order to parse them with "strptime". It uses the internal system function "strptime" when parsing. And it has to describe month, day, hour or year in the exact format that the system function supports.
USE_INDEX Index creation flag for the column: 0: Do not create/ 1: Create It is automatically generated based on data types.
REGEX_NO Number of result values from the regular expression that is entered as REGEX. When the input log string is parsed, it is printed in multiple strings. In this case, it needs to determine what to use for the current column from the several results and it records the number of the result as well. When it's parsed, the utility machregex can be used to see the string.

Example of syslog.tpl

Below describes the actual contents of syslog.tpl. Copy $home/machbase/machbase_home/collector/syslog.tpl to syslog_test.tpl file and put it into practice.

###############################################################################
# Copyright of this product 2013-2023,
# Machbase Inc. or its subsidiaries.
# All Rights reserved
###############################################################################

#
#  This file is for Machbase collector template file.
#

###################################################################
# Input setting
###################################################################

COLLECT_TYPE=FILE <== It specifies a method to collect local data.
LOG_SOURCE=/var/log/syslog <== It specifies a location of source file.

###################################################################
# Process setting
###################################################################

REGEX_PATH=syslog.rgx <== It specifies a location of regular expression file.

###################################################################
# Output setting
###################################################################

DB_TABLE_NAME = "syslogtable" <== Table name: data are inserted here.
DB_ADDR       = "127.0.0.1" <== Server IP where machbased is being operated.
DB_PORT       = 5656
DB_USER       = "SYS"
DB_PASS       = "MANAGER"

# 0: Direct insert
# 1: Prepared insert
# 2: Append
APPEND_MODE=2 <== Data insertion in APPEND mode.

# 0: None, just append.
# 1: Truncate.
# 2: Try to create table. If table already exists, warn it and proceed.
# 3: Drop and create.
CREATE_TABLE_MODE=2 <== Create a table if there is none.

Syslog.rgx is the REGEX file which was specified in the syslog.tpl file. RGX file is normally required the absolute path, but for files located in $home/machbase/machbase_home/collector/regex folder, absolute paths are not required.

###############################################################################
# Copyright of this product 2013-2023,
# Machbase Corporation (Incorporation) or its subsidiaries.
# All Rights reserved
###############################################################################

#
#  This file is for Machbase collector regex file.
#

LOG_TYPE=syslog

COL_LIST= (
     (
        REGEX_NO = 0 <== It is the number included in the results of machregex.
        NAME = tm
        TYPE = datetime
        SIZE = 8
        DATE_FORMAT="%b %d %H:%M:%S" <== Use dateformat of strptime.
         ),
     (
        REGEX_NO = 4
        NAME = host
        TYPE = varchar
        SIZE = 128
USE_INDEX = 1 <== Determine whether to use the index.
         ),
     (
        REGEX_NO = 5
        NAME = msg
        TYPE = varchar
        SIZE = 512
USE_INDEX = 1
         )
)

# Below is the regular expression to pares syslog data. It may not work properly if it is modified.
REGEX="(([a-zA-Z]+)\s+([0-9]+)\s+([0-9:]*))\s(\S+)\s+([^\n]+)"

END_REGEX="\n"

Create a Collector

The example below is to create a collector named "syslog_test".

mach> CREATE COLLECTOR localhost.syslog_test FROM "/home/mach/mach_collector_home/collector/syslog.tpl";
Created successfully.

Verify a Collector

You can check the information of the registered collectors in the M$SYS_COLLECTORS table. Also, you can check whether the collector is running with "run_flag" column. If it is 0, the collector is stopped. If it is 1, it is currently operating.

mach> SELECT collector_name, run_flag FROM m$sys_collectors;
collector_name                            run_flag    
---------------------------------------------------------
SYSLOG_TEST                               0           
[1] row(s) selected.
Elapsed Time : 0.001
mach> SELECT * FROM m$sys_collectors;
COLLECTOR_ID MANAGER_NAME                                 COLLECTOR_NAME                            
-----------------------------------------------------------------------------------------------------
LOG_TYPE                                  TABLE_NAME                                
---------------------------------------------------------------------------------------
TEMPLATE_NAME                                                                     COLLECT_TYPE                              
-------------------------------------------------------------------------------------------------------------------------------
COLLECTOR_SOURCE                                                                  
------------------------------------------------------------------------------------
COLLECTOR_LIB                                                                     COL_COUNT   
-------------------------------------------------------------------------------------------------
PREPROCESS_PATH                                                                   
------------------------------------------------------------------------------------
REGEX_PATH                                                                        
------------------------------------------------------------------------------------
REGEX                                                                             
------------------------------------------------------------------------------------
END_REGEX                                                                         
------------------------------------------------------------------------------------
DEFAULT_ADDR                                                                      LANGUAGE                          
-----------------------------------------------------------------------------------------------------------------------
SLEEP_TIME  DB_ADDR                                   DB_PORT     DB_USER                                   
-----------------------------------------------------------------------------------------------------------------
DB_PASS                                   RUN_FLAG    
---------------------------------------------------------
1           LOCALHOST                                 SYSLOG_TEST                               
syslog                                    syslogtable                               
/home/mach/mach_collector_home/collector/syslog.tpl                             FILE                                      
/var/log/syslog                                                                   
NULL                                                                              7           
NULL                                                                              
syslog.rgx                                                                        
(([a-zA-Z]+)\s+([0-9]+)\s+([0-9:]*))\s(\S+)\s+([^\n]+)                            
\n                                                                                
192.168.122.1                                                                     UTF-8                             
1000        127.0.0.1                                 5656        SYS                                       
MANAGER                                   0           
[1] row(s) selected.
Elapsed Time : 0.003
mach>

Start a Collector

Syntax:

ALTER COLLECTOR manager_name.collector_name START [TRACE];

To start a collector, use ALTER COLLECTOR.
manager_name : Name for registered collector manager.
collector_name : Name of newly created collector.

When there is an error while operating collectors, you can check the detailed history by using TRACE statement.
The detailed information recorded in $home/machbase/machbase_home/trc/machcollector.trc, so you can easily perform debugging with them.

Example:

mach> ALTER COLLECTOR localhost.syslog_test START;
Altered successfully.
Elapsed Time : 0.042
mach> SELECT collector_name, run_flag FROM m$sys_collectors;
collector_name                            run_flag    
---------------------------------------------------------
SYSLOG_TEST                               1           
[1] row(s) selected.
Elapsed Time : 0.000
mach>

You can see that run_flag is 1.

When you start a collector, the log table will be generated in the main server.
collector_type, collector_addr, collector_origin, and collector_offset are set as default. As specified in the syslog.tpl file, tmp, host, and msg columns are created as well.

Example:

mach> ALTER COLLECTOR localhost.syslog_test START;
Altered successfully.
Elapsed Time : 0.042
mach> SELECT collector_name, run_flag FROM m$sys_collectors;
collector_name                            run_flag    
---------------------------------------------------------
SYSLOG_TEST                               1           
[1] row(s) selected.
Elapsed Time : 0.000
mach>

Caution must be exercised to the fact that the server for registering collectors and the main server for creating log tables can be different. Even though the two servers have Machbase installed and use machsql, when you select data from syslogtable, machsql is executed in the main server. For the rest, machsql is executed in the client's server where log files are existed.

When there is a failure or a collector has been stopped and re-executed, it is able to find and retrieve exact log files as it remembers the offset value of the last log file in the log table.

Verify Data

Below displays comparison of the original syslog data with the inserted data. This shows the last 10 logs from the original syslog file.

[mach@localhost ~/mach]$ tail -n 10 /var/log/syslog
Jun 28 21:05:01 localhost CROND[12285]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 28 21:10:01 localhost CROND[12442]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 28 21:10:01 localhost CROND[12443]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 28 21:15:01 localhost CROND[12527]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 28 21:20:01 localhost CROND[12609]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 28 21:20:01 localhost CROND[12608]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 28 21:25:01 localhost CROND[12707]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 28 21:25:01 localhost CROND[12708]: (pcp) CMD ( /usr/libexec/pcp/bin/pmlogger_check -C)
Jun 28 21:25:43 localhost su: pam_unix(su:session): session opened for user root by mach(uid=506)
Jun 28 21:26:02 localhost su: pam_unix(su:session): session closed for user root
[mach@localhost ~/mach]$

These are the 10 latest data which are selected from syslogtable.

mach> SELECT tm, msg FROM syslogtable LIMIT 10;
tm                              msg                                                                               
---------------------------------------------------------------------------------------------------------------------
2016-06-28 21:26:02 000:000:000 su: pam_unix(su:session): session closed for user root                            
2016-06-28 21:25:43 000:000:000 su: pam_unix(su:session): session opened for user root by mach(uid=506)          
2016-06-28 21:25:01 000:000:000 CROND[12708]: (pcp) CMD ( /usr/libexec/pcp/bin/pmlogger_check -C)                 
2016-06-28 21:25:01 000:000:000 CROND[12707]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --loc  
                                k-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)              
2016-06-28 21:20:01 000:000:000 CROND[12608]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --loc  
                                k-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)              
2016-06-28 21:20:01 000:000:000 CROND[12609]: (root) CMD (/usr/lib64/sa/sa1 1 1)                                  
2016-06-28 21:15:01 000:000:000 CROND[12527]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --loc  
                                k-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)              
2016-06-28 21:10:01 000:000:000 CROND[12443]: (root) CMD (/usr/lib64/sa/sa1 1 1)                                  
2016-06-28 21:10:01 000:000:000 CROND[12442]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --loc  
                                k-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)              
2016-06-28 21:05:01 000:000:000 CROND[12285]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --loc  
                                k-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)              
[10] row(s) selected.
Elapsed Time : 0.002
mach>

You can check the collector being processed as below.

mach> SELECT collector_name, run_flag FROM m$sys_collectors;
collector_name                            run_flag    
---------------------------------------------------------
SYSLOG_TEST                               1           
[1] row(s) selected.
Elapsed Time : 0.001
mach>

Stop a Collector

Syntax:

ALTER COLLECTOR manager_name.collector_name STOP;

Example:

mach> ALTER COLLECTOR localhost.syslog_test STOP;
Altered successfully.
Elapsed Time : 1.253
mach>

You can check that the collector is stopped as shown below.

mach> ALTER COLLECTOR localhost.syslog_test STOP;
Altered successfully.
Elapsed Time : 1.253
mach>

Delete a Collector

Syntax:

DROP COLLECTOR manager_name.collector_name;

Example:

mach> DROP COLLECTOR localhost.syslog_test;
Dropped successfully.
Elapsed Time : 0.041
mach>

You can see that the collector is deleted as shown below.

mach> SELECT collector_name, run_flag FROM m$sys_collectors;
collector_name                            run_flag    
---------------------------------------------------------
[0] row(s) selected.
Elapsed Time : 0.001
mach>

Collector Reload

Syntax:

ALTER COLLECTOR manager_name.collector_name RELOAD;

Example:
Create a collector by using syslog.tpl, and then modify and apply the contents of a template file. Newly created syslog file is as follows.

mach> SELECT * FROM m$sys_collectors;
COLLECTOR_ID MANAGER_NAME                                 COLLECTOR_NAME                            
-----------------------------------------------------------------------------------------------------
LOG_TYPE                                  TABLE_NAME                                
---------------------------------------------------------------------------------------
TEMPLATE_NAME                                                                     COLLECT_TYPE                              
-------------------------------------------------------------------------------------------------------------------------------
COLLECTOR_SOURCE                                                                  
------------------------------------------------------------------------------------
COLLECTOR_LIB                                                                     COL_COUNT   
-------------------------------------------------------------------------------------------------
PREPROCESS_PATH                                                                   
------------------------------------------------------------------------------------
REGEX_PATH                                                                        
------------------------------------------------------------------------------------
REGEX                                                                             
------------------------------------------------------------------------------------
END_REGEX                                                                         LANGUAGE                          
-----------------------------------------------------------------------------------------------------------------------
SLEEP_TIME  DB_ADDR                                   DB_PORT     DB_USER                                   
-----------------------------------------------------------------------------------------------------------------
DB_PASS                                   PROCESS_BYTE         PROCESS_RECORD       RUN_FLAG    
-----------------------------------------------------------------------------------------------------
4           LOCALHOST                                 CUSTOM                                    
syslog                                    syslogtable                               
syslog.tpl                                                                        FILE                                      
/var/log/syslog                                                                   
NULL                                                                              7           
NULL                                                                              
syslog.rgx                                                                        
(([a-zA-Z]+)\s+([0-9]+)\s+([0-9:]*))\s(\S+)\s+([^\n]+)                            
\n                                                                                UTF-8                             
1000        127.0.0.1                                 5656        SYS                                       
MANAGER                                   0                    0                    0           
[1] row(s) selected.
Elapsed time: 0.002
mach>

Try to change a name of a table where data will be inserted, to "anothertable." To apply the updated data, issue the RELOAD command and check whether the data are updated.

mach> ALTER COLLECTOR localhost.custom RELOAD;
Altered successfully.
Elapsed time: 0.002

mach> SELECT * FROM m$sys_collectors;
COLLECTOR_ID MANAGER_NAME                                 COLLECTOR_NAME                            
-----------------------------------------------------------------------------------------------------
LOG_TYPE                                  TABLE_NAME                                
---------------------------------------------------------------------------------------
TEMPLATE_NAME                                                                     COLLECT_TYPE                              
-------------------------------------------------------------------------------------------------------------------------------
COLLECTOR_SOURCE                                                                  
------------------------------------------------------------------------------------
COLLECTOR_LIB                                                                     COL_COUNT   
-------------------------------------------------------------------------------------------------
PREPROCESS_PATH                                                                   
------------------------------------------------------------------------------------
REGEX_PATH                                                                        
------------------------------------------------------------------------------------
REGEX                                                                             
------------------------------------------------------------------------------------
END_REGEX                                                                         LANGUAGE                          
-----------------------------------------------------------------------------------------------------------------------
SLEEP_TIME  DB_ADDR                                   DB_PORT     DB_USER                                   
-----------------------------------------------------------------------------------------------------------------
DB_PASS                                   PROCESS_BYTE         PROCESS_RECORD       RUN_FLAG    
-----------------------------------------------------------------------------------------------------
4           LOCALHOST                                 CUSTOM                                    
syslog                                    anothertable                              
syslog.tpl                                                                        FILE                                      
/var/log/syslog                                                                   
NULL                                                                              7           
NULL                                                                              
syslog.rgx                                                                        
(([a-zA-Z]+)\s+([0-9]+)\s+([0-9:]*))\s(\S+)\s+([^\n]+)                            
\n                                                                                UTF-8                             
1000        127.0.0.1                                 5656        SYS                                       
MANAGER                                   0                    0                    0           
[1] row(s) selected.
Elapsed time: 0.001
mach>

Now, you can see the name of the table is changed into "anothertable."

results matching ""

    No results matching ""