Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Execute machcollectormanager

Now execute machcollectormanager. Currently, it cannot be executed remotely. To connect to Machbase, execute machcollectormanager remotely by using machcollectoradmin.machcollectormanager는 직접 실행할 수 없고, machcollectoradmin을 통해서 실행해야 한다.

Code Block


[mach@localhost ~]$ machcollectoradmin --startup
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for collectormanager start.
Collectormanager started successfully.

...

Shutdown machcollectormanager

This command terminates machcollectormanger. All the collectors that were operated through this machcollectormanager will be terminated as wellmachcollectormanger를 중지하면 그 collectormanager가 관리하는 collector프로세스도 동시에 중지된다.

Code Block
[mach@localhost ~]$ machcollectoradmin --shutdown
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
CollectorManager server shutdown successfully.

...

Destroy machcollectormanager Meta Data

It can delete all meta data that were used within the machcollectormanager. It deletes all the information regarding the registered servers and executed collectors, but it cannot be executed if machcollectormanter is still operatingmachcollectormanager가 관리하는 collector, 데이터베이스 서버 등에 대한 정보를 삭제한다. machcollectormanager가 실행중이면 이 명령은 오류로 처리된다.

Code Block
[mach@localhost ~]$ machcollectoradmin --destroy
-----------------------------------------------------------------
machcollector administration tool
Release Version - 3.5.0.826b8f2.community
Copyright 2014, Machbase Inc. or its subsidiaries
All Rights Reserved.
-----------------------------------------------------------------
Destroyed meta data successfully.

...

Kill machcollectormanager

This command forces to terminate machcollectormanager. It terminates currently operating machcollectormanager with a kill signal, not waiting for other processes to shut down.machcollectormanger가 shutdown과정을 대기하지 않고 즉시 중지한다.

Code Block
[mach@localhost ~]$ machcollectoradmin --kill
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Waiting for collectormanager terminated.
Collectormanager terminated successfully.

Register Machbase Server

...

.


Register Machbase Server

machcollectormanger에 연결된 마크베이스 데이터베이스 서버를 설정한다. 이후 machsql을 통한 관리가 가능하다.

Code Block
[mach@localhost ~]$ machcollectoradmin --createserver=127.0.0.1:5757  
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Created the server successfully.


Specify a Server Name

...

a Server Name

마크베이스 서버에 collectormanager를 등록할 때, 등록하는 collectormanager의 이름을 설정할 수 있다.

Code Block
 [mach@localhost ~]$ machcollectoradmin --createserver=127.0.0.1:5757 --managername=mach_manager 
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Created the server successfully.


Verify the Server List

This command allows you to check the list of servers that were registered in the machcollectoradminmachcollectormanager에 등록된 데이터베이스 서버 리스트를 표시한다.

Code Block
[mach@localhost ~]$ machcollectoradmin --showservers;
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
ID   1
NAME 192.168.0.34:5757
ADDR 192.168.0.34
PORT 5757


Create a CollectorCollector

Collectormanger가 관리하는 collector를 생성한다. collector를 생성할 때 --template 옵션을 지정해야 한다.

It creates a collector in a collector manager. The name of collector will be received as an argument. Each time a collector is created, --template and -m options must be used.

Code Block
[mach@localhost ~]$ machcollectoradmin --createcollector=syslog --template=/home/hanchi/work/nfx/machbase_home/collector/syslog.tpl
-----------------------------------------------------------------
machcollector administration tool
Release Version - 3.5.0.826b8f2.community
Copyright 2014, Machbase Inc. or its subsidiaries
All Rights Reserved.
-----------------------------------------------------------------
Created the collector successfully.


Specify a Template

It can specify a template file for a collector that will be created. If it is created as relative path, it can be found in the  collector를 생성할 때, collector설정 파일인 template파일의 경로를 지정한다. 상대 경로인 경우 $MACHBASE_HOME/collector/ directory디렉토리를 기준으로 한다.

Code Block
[mach@localhost ~]$ machcollectoradmin --createcollector=syslog --template=syslog.tpl
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Created the collector successfully.	


Execute a Collector

It can execute a collector. Insert the name of the collector that needs to be executed as an argument등록된 collector프로세스를 실행한다. 실행시 collector 이름을 명시해야 한다.

Code Block
[mach@localhost ~]$ machcollectoradmin --startcollector=syslog
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Started the collector successfully.


Set Collector Tracing

It allows users to set whether to leave trace logs of the collector being used. It can be set if the current option is used when the collector is being operating. If the argument is set 1, the trace feature is on. If it is 0, the trace is off사용자가 콜렉터 실행시에 추적 메시지를 생성하도록 한다. 값을 1로 설정하면 생성되고 0으로 설정하면 생성하지 않는다.

Code Block
[mach@localhost ~]$ machcollectoradmin --startcollector=syslog --trace=1
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Started the collector successfully.


Stop a Collector

This command stops the collector that is currently operating. It enters the name of the collector as an argument실행중인 콜렉터를 중지시킨다.

Code Block
[mach@localhost ~]$ machcollectoradmin --stopcollector=syslog
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Stopped the collector successfully.


Drop a Collector

It deletes a collector that is not currently operating. It enters the name of the collector as an argumentcollector에 관련된 메타 정보를 삭제한다. 실행시 collector의 이름을 명시해야 한다.

Code Block
[mach@localhost ~]$ machcollectoradmin --dropcollector=syslog
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbasae Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Dropped the collector successfully.

...

Verify the Collector List

It can check the list of the registered collectors등록된 collector의 리스트를 표시한다.

Code Block
[mach@localhost ~]$ machcollectoradmin --showcollectors;
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - 3.5.0.826b8f2.community
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
ID                  1
NAME                SYSLOG
TEMPLATE_PATH       syslog.tpl
COLLECT_TYPE        FILE
SOURCE_FILE         /var/log/syslog
LOG_TYPE            syslog
PREPROCESS_PATH     
REGEX_PATH          syslog.rgx
REGEX               (([a-zA-Z]+)\s+([0-9]+)\s+([0-9:]*))\s(\S+)\s+([^\n]+)
END_REGEX           \n
LANGUAGE            UTF-8
SLEEP_TIME          1000
PROCESS_BYTE        0
PROCESS_RECORD      0
PREV_PROCESS_BYTE   0
PREV_PROCESS_RECORD 0
RUN_FLAG            0

...