List of Contents
- Execute machcollectormanager
- Shutdown machcollectormanager
- Destroy machcollectormanager Meta Data
- Kill machcollectormanager
- Register Machbase Server
- Specify a Server Name
- Verify the Server List
- Create a Collector
- Specify a Template
- Execute a Collector
- Set Collector Tracing
- Stop a Collector
- Drop a Collector
- Verify the Collector List
machcollectoradmin은 machcollectormanger를 관리하는 도구이다.
Options and Descriptions
[mach@localhost ~]$ machcollectoradmin --help ----------------------------------------------------------------- machcollector administration tool Release Version - 3.5.0.826b8f2.community Copyright 2014, Machbase Inc. or its subsidiaries All Rights Reserved. ----------------------------------------------------------------- << Available option lists >> -u, --startup Startup collectormanager. -s, --shutdown Shutdown collectormanager. -d, --destroy Destroy meta data. -k, --kill Terminate collectormanager. --showcollectors Show collector list. --showservers Show server list. -h, --help Print collector argument guide. --createcollector=collector_name Create collector. --dropcollector=collector_name Drop collector. --startcollector=collector_name Start collector. --stopcollector=collector_name Stop collector. -m, --template=template_path Set template path. Template path is required to issues createcollector command. -t, --trace=[0,1] Set trace option. Start collector mode (default: 0) --createserver=host:port Manager registers itself to the server. --managername=managername Specify a name of the manager. If not specified, default name will be used.
Execute machcollectormanager
Now execute machcollectormanager. Currently, it cannot be executed remotely. To connect to Machbase, execute machcollectormanager remotely by using machcollectoradmin.
[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 well.
[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 operating.
[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.
[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
This command registers the manager where the machcollector is installed, to the Machbase server. After the registration, it enables to manage collector managers remotely by using machsql inside of Machbase server.
[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
When executing a command to add additional servers, you can specify a name of collector manager. Argument of --managername should be executed with --createserver. Therefore, it can be specified in machcollectoradmin when the manager is created. The example below shows that the manager name will be displayed as mach_manager.
[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 machcollectoradmin.
[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 Collector
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.
[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 $MACHBASE_HOME/collector/ directory.
[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.
[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.
[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.
[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 argument.
[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.
[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